xfree86: Allocate sufficienct space for dev2screen array
When the dev2screen is sized to xf86NumDrivers in DoConfigure(), subsequent code may attempt to write past the end of the array. Size the dev2screen array to nDevToConfig instead. Signed-off-by: Jeff Smith <whydoubt@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
1a24a0ae7b
commit
e81031f3fd
|
@ -702,7 +702,7 @@ DoConfigure(void)
|
|||
|
||||
xf86DoConfigurePass1 = FALSE;
|
||||
|
||||
dev2screen = xnfcalloc(xf86NumDrivers, sizeof(int));
|
||||
dev2screen = xnfcalloc(nDevToConfig, sizeof(int));
|
||||
|
||||
{
|
||||
Bool *driverProbed = xnfcalloc(xf86NumDrivers, sizeof(Bool));
|
||||
|
|
Loading…
Reference in New Issue