From 3fc3c6a6893dc7846f96987829fe3d766979cb1a Mon Sep 17 00:00:00 2001 From: Hannes Weisbach Date: Fri, 15 Jul 2016 13:48:25 +0200 Subject: [PATCH] bochs: backport fix for out-of-bounds memory access Upstream SVN r11912: "Fixed some gcc 4.8.1 warnings" Change-Id: I599eb4d6bb8d5a7a2585bcca7d9a738ac2930aac --- simulators/bochs/iodev/vga.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simulators/bochs/iodev/vga.cc b/simulators/bochs/iodev/vga.cc index d3d0e0ac..446613c6 100644 --- a/simulators/bochs/iodev/vga.cc +++ b/simulators/bochs/iodev/vga.cc @@ -558,7 +558,7 @@ void bx_vga_c::determine_screen_dimensions(unsigned *piHeight, unsigned *piWidth { int ai[0x20]; int i,h,v; - for (i = 0 ; i < 0x20 ; i++) + for (i = 0 ; i < 0x19 ; i++) ai[i] = BX_VGA_THIS s.CRTC.reg[i]; h = (ai[1] + 1) * 8;