Fix for CVE-2007-5760 - XFree86 Misc extension out of bounds array index
This commit is contained in:
parent
e85130c85f
commit
bbde5b62a1
|
@ -548,6 +548,10 @@ MiscExtPassMessage(int scrnIndex, const char *msgtype, const char *msgval,
|
|||
{
|
||||
ScrnInfoPtr pScr = xf86Screens[scrnIndex];
|
||||
|
||||
/* should check this in the protocol, but xf86NumScreens isn't exported */
|
||||
if (scrnIndex >= xf86NumScreens)
|
||||
return BadValue;
|
||||
|
||||
if (*pScr->HandleMessage == NULL)
|
||||
return BadImplementation;
|
||||
return (*pScr->HandleMessage)(scrnIndex, msgtype, msgval, retstr);
|
||||
|
|
Loading…
Reference in New Issue
Block a user