]> xenbits.xensource.com Git - qemu-upstream-4.5-testing.git/commit
ui: vnc: avoid floating point exception
authorPrasad J Pandit <pjp@fedoraproject.org>
Thu, 3 Dec 2015 13:24:17 +0000 (18:54 +0530)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 5 Feb 2016 14:55:00 +0000 (14:55 +0000)
commitca4b8af6798b1e21c3ef4dfa8df7fbb133f55396
tree41489ba9d7e22398d2b09de915f5365a669f739b
parent78668ee0d72990e083177465f15584a893ebf884
ui: vnc: avoid floating point exception

While sending 'SetPixelFormat' messages to a VNC server,
the client could set the 'red-max', 'green-max' and 'blue-max'
values to be zero. This leads to a floating point exception in
write_png_palette while doing frame buffer updates.

Reported-by: Lian Yihan <lianyihan@360.cn>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
ui/vnc.c