diff options
Diffstat (limited to 'xserver/hw/xfree86/vbe/vbe.c')
-rw-r--r-- | xserver/hw/xfree86/vbe/vbe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xserver/hw/xfree86/vbe/vbe.c b/xserver/hw/xfree86/vbe/vbe.c index 7a64a4a71..1d3775bfa 100644 --- a/xserver/hw/xfree86/vbe/vbe.c +++ b/xserver/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; |