mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-05 23:35:51 +00:00
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@gmail.com> Reported-by: Zhongqiang Huang <useprxf@gmail.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
169d8462e3
commit
04e7f512d2
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user