[Spice-commits] Branch '0.12' - server/glz_encoder.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Thu Apr 26 12:37:52 UTC 2018
server/glz_encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8229a323db519f1c33e77cec2e3f6516a7c402c7
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Mon Apr 23 10:50:43 2018 +0100
glz-encoder: Do not discard top bits of lower part sending 64 bit ints
When GLZ code attempts to send a 64 bit integer the 8 top bit of
the lower (32 bits) part of the number are stripped due to a bug.
This was discovered by Zhongqiang Huang <useprxf at gmail.com>
Reported-by: Zhongqiang Huang <useprxf at gmail.com>
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
diff --git a/server/glz_encoder.c b/server/glz_encoder.c
index d9d6be11..4cf7c2a1 100644
--- a/server/glz_encoder.c
+++ b/server/glz_encoder.c
@@ -84,7 +84,7 @@ static inline void encode_32(Encoder *encoder, unsigned int word)
static inline void encode_64(Encoder *encoder, uint64_t word)
{
encode_32(encoder, (uint32_t)(word >> 32));
- encode_32(encoder, (uint32_t)(word & 0xffffff));
+ encode_32(encoder, (uint32_t)(word & 0xffffffffu));
}
static inline void encode_copy_count(Encoder *encoder, uint8_t copy_count)
More information about the Spice-commits
mailing list