References: bsc#958493 CVE-2015-8504 Index: xen-4.6.1-testing/tools/qemu-xen-traditional-dir-remote/vnc.c =================================================================== --- xen-4.6.1-testing.orig/tools/qemu-xen-traditional-dir-remote/vnc.c +++ xen-4.6.1-testing/tools/qemu-xen-traditional-dir-remote/vnc.c @@ -1644,15 +1644,15 @@ static void set_pixel_format(VncState *v } vs->clientds = vs->serverds; - vs->clientds.pf.rmax = red_max; + vs->clientds.pf.rmax = red_max ? red_max : 0xFF; count_bits(vs->clientds.pf.rbits, red_max); vs->clientds.pf.rshift = red_shift; vs->clientds.pf.rmask = red_max << red_shift; - vs->clientds.pf.gmax = green_max; + vs->clientds.pf.gmax = green_max ? green_max : 0xFF; count_bits(vs->clientds.pf.gbits, green_max); vs->clientds.pf.gshift = green_shift; vs->clientds.pf.gmask = green_max << green_shift; - vs->clientds.pf.bmax = blue_max; + vs->clientds.pf.bmax = blue_max ? blue_max : 0xFF; count_bits(vs->clientds.pf.bbits, blue_max); vs->clientds.pf.bshift = blue_shift; vs->clientds.pf.bmask = blue_max << blue_shift;