[PATCH spice-gtk 3/4] Avoid from sending data that is not compressible with LZ4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/channel-usbredir.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/channel-usbredir.c b/src/channel-usbredir.c
index f09b0bf..0b1cd47 100644
--- a/src/channel-usbredir.c
+++ b/src/channel-usbredir.c
@@ -677,7 +677,7 @@ static int try_write_compress_LZ4(SpiceUsbredirChannel *channel, uint8_t *data,
                                                  (char*)compressed_buf,
                                                  count,
                                                  bound);
-    if (compressed_data_count > 0) {
+    if (compressed_data_count > 0 && compressed_data_count < count) {
         compressed_data_msg.compressed_data = compressed_buf;
         msg_out_compressed = spice_msg_out_new(SPICE_CHANNEL(channel),
                                                SPICE_MSGC_SPICEVMC_COMPRESSED_DATA);
-- 
2.5.5

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]