From e65e95c8c44f47ef044980f59a2549684e6c9403 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 28 Apr 2008 10:24:50 +1000 Subject: r128: fix bios size setting for pciaccess --- src/r128_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/r128_driver.c b/src/r128_driver.c index 2eb9d26..8f360a1 100644 --- a/src/r128_driver.c +++ b/src/r128_driver.c @@ -488,7 +488,8 @@ static Bool R128GetBIOSParameters(ScrnInfoPtr pScrn, xf86Int10InfoPtr pInt10) (info->VBIOS[(v) + 3] << 24)) #ifdef XSERVER_LIBPCIACCESS - info->VBIOS = xalloc(info->PciInfo->rom_size); + int size = info->PciInfo->rom_size > R128_VBIOS_SIZE ? info->PciInfo->rom_size : R128_VBIOS_SIZE; + info->VBIOS = xalloc(size); #else info->VBIOS = xalloc(R128_VBIOS_SIZE); #endif -- cgit v1.2.3