[spice-common][PATCH 1/2] ppc: Deal with lz magic endianess

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

 



Since commit d39dfbfe lz magic is always treated as LE when encoded.
Treating it as a LE when decoding is now necessary as well.
---
 common/lz.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/lz.c b/common/lz.c
index 2350152..8698159 100644
--- a/common/lz.c
+++ b/common/lz.c
@@ -603,7 +603,8 @@ void lz_decode_begin(LzContext *lz, uint8_t *io_ptr, unsigned int num_io_bytes,
         encoder->usr->error(encoder->usr, "io reset failed");
     }
 
-    magic = decode_32(encoder);
+    magic = GUINT32_FROM_LE(decode_32(encoder));
+
     if (magic != LZ_MAGIC) {
         encoder->usr->error(encoder->usr, "bad magic\n");
     }
-- 
2.4.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]