hw/xwin: Fix an issue in winSetSpansNativeGDI() identifed by -Warray-bounds
authorJon TURNEY <jon.turney@dronecode.org.uk>
Sun, 7 Apr 2013 22:59:44 +0000 (23:59 +0100)
committerJon TURNEY <jon.turney@dronecode.org.uk>
Fri, 30 Aug 2013 11:58:51 +0000 (12:58 +0100)
commit4bfb2dce5eea4923eaf86eca33b96087b28235f5
tree89abbec7d74946811f70d9512934da942e941abc
parent784c006adb22c6693ad30dd0b1b05369cfaa7b5e
hw/xwin: Fix an issue in winSetSpansNativeGDI() identifed by -Warray-bounds

The BITMAPINFO local only has room for a single RBGQUAD in bmiColors, but we
access two (black and white for a mono-color DIB).  Fix by changing to a dynamic
allocation big enough for a BITMAPINFO and a RGBQUAD.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Marc Haesen <marha@users.sourceforge.net>
hw/xwin/winsetsp.c