[Spice-commits] common/quic.c

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 4 15:06:18 UTC 2018

 common/quic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 349a74d7c272fdba04533760779dc9d0c2f7f073
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Sat Jun 2 20:44:02 2018 +0100

    quic: Fix endianness encoding
    The image is going to network and network protocol is little endian
    so the numbers has to be little endian. Note that this is already done
    during decoding.
    Tested on a ppc64 machine.
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/common/quic.c b/common/quic.c
index 1ec6baa..e31f789 100644
--- a/common/quic.c
+++ b/common/quic.c
@@ -393,7 +393,7 @@ static inline void write_io_word(Encoder *encoder)
     if (encoder->io_now == encoder->io_end) {
-    *(encoder->io_now++) = encoder->io_word;
+    *(encoder->io_now++) = GUINT32_TO_LE(encoder->io_word);
 static inline void encode(Encoder *encoder, unsigned int word, unsigned int len)

More information about the Spice-commits mailing list