diff options
-rw-r--r-- | hw/xfree86/vbe/vbe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/vbe/vbe.c b/hw/xfree86/vbe/vbe.c index bcda5ec35..04132d956 100644 --- a/hw/xfree86/vbe/vbe.c +++ b/hw/xfree86/vbe/vbe.c @@ -395,7 +395,7 @@ VBEGetVBEInfo(vbeInfoPtr pVbe) i = 0; while (modes[i] != 0xffff) i++; - block->VideoModePtr = malloc(sizeof(CARD16) * i + 1); + block->VideoModePtr = malloc(sizeof(CARD16) * (i + 1)); memcpy(block->VideoModePtr, modes, sizeof(CARD16) * i); block->VideoModePtr[i] = 0xffff; |