Fix incorrect attempt to clear a flag in vnc.c
PATCH 1/1 Fix incorrect attempt to clear a flag in vnc.c
In vnc.c in pixel_format_message, the code tries to clear the QEMU_ALLOCATED_FLAG from the client display surface, however it uses the wrong operator and ends up enabling all other flags. Most notably this enables the big endian flag and causes some chaos.
vnc.c +1 -1
@@ -1421,7 +1421,7 @@else if (vs->ds->surface->pf.bits_per_pixel ==8 ) vs->send_hextile_tile = send_hextile_tile_8; vs->clientds = *(vs->ds->surface); - vs->clientds.flags |= ~QEMU_ALLOCATED_FLAG ; + vs->clientds.flags &= ~QEMU_ALLOCATED_FLAG ; vs->write_pixels = vnc_write_pixels_copy;vnc_write (vs, pad,3 );/* padding */
Quoted 3 lines · Brian Kress
In
vnc.cinpixel_format_message, the code tries to clear theQEMU_ALLOCATED_FLAGfrom the client display surface, however it uses the wrong operator and ends up enabling all other flags. Most notably this enables the big endian flag and causes some chaos.
Can you add a Signed-off-by line?
Regards,
Anthony Liguori
Quoted 6 lines · Anthony Liguori
Quoted 3 lines · Brian Kress
In
vnc.cinpixel_format_message, the code tries to clear theQEMU_ALLOCATED_FLAGfrom the client display surface, however it uses the wrong operator and ends up enabling all other flags. Most notably this enables the big endian flag and causes some chaos.Can you add a Signed-off-by line?
vnc.c +1 -1
@@ -1421,7 +1421,7 @@else if (vs->ds->surface->pf.bits_per_pixel ==8 ) vs->send_hextile_tile = send_hextile_tile_8; vs->clientds = *(vs->ds->surface); - vs->clientds.flags |= ~QEMU_ALLOCATED_FLAG ; + vs->clientds.flags &= ~QEMU_ALLOCATED_FLAG ; vs->write_pixels = vnc_write_pixels_copy;vnc_write (vs, pad,3 );/* padding */
Aurelien Jarno
AppliedQuoted 11 lines · Brian Kress
Quoted 9 lines · Anthony Liguori
Quoted 6 lines · Brian Kress
In
vnc.cinpixel_format_message, the code tries to clear theQEMU_ALLOCATED_FLAG
from the client display surface, however it uses the wrong operator and ends up enabling all
other flags. Most notably this enables the big endian flag and causes some chaos.Can you add a Signed-off-by line?
Signed-off-by Brian Kress <[email protected]>
Thanks, applied.
Quoted 17 lines
Index:
vnc.c
===================================================================vnc.c +1
-1@@ -1421,7 +1421,7 @@else if (vs->ds->surface->pf.bits_per_pixel ==8 ) vs->send_hextile_tile = send_hextile_tile_8; vs->clientds = *(vs->ds->surface); - vs->clientds.flags |= ~QEMU_ALLOCATED_FLAG ; + vs->clientds.flags &= ~QEMU_ALLOCATED_FLAG ; vs->write_pixels = vnc_write_pixels_copy;vnc_write (vs, pad,3 );/* padding */
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net