xen/CVE-2015-8504-qemuu-vnc-avoid-floating-point-exception.patch

26 lines
1.0 KiB
Diff
Raw Normal View History

2016-01-04 23:25:00 +01:00
References: bsc#958493 CVE-2015-8504
Index: xen-4.6.0-testing/tools/qemu-xen-dir-remote/ui/vnc.c
===================================================================
--- xen-4.6.0-testing.orig/tools/qemu-xen-dir-remote/ui/vnc.c
+++ xen-4.6.0-testing/tools/qemu-xen-dir-remote/ui/vnc.c
@@ -2036,15 +2036,15 @@ static void set_pixel_format(VncState *v
return;
}
- vs->client_pf.rmax = red_max;
+ vs->client_pf.rmax = red_max ? red_max : 0xFF;
vs->client_pf.rbits = hweight_long(red_max);
vs->client_pf.rshift = red_shift;
vs->client_pf.rmask = red_max << red_shift;
- vs->client_pf.gmax = green_max;
+ vs->client_pf.gmax = green_max ? green_max : 0xFF;
vs->client_pf.gbits = hweight_long(green_max);
vs->client_pf.gshift = green_shift;
vs->client_pf.gmask = green_max << green_shift;
- vs->client_pf.bmax = blue_max;
+ vs->client_pf.bmax = blue_max ? blue_max : 0xFF;
vs->client_pf.bbits = hweight_long(blue_max);
vs->client_pf.bshift = blue_shift;
vs->client_pf.bmask = blue_max << blue_shift;