XQuartz: Validate screen in AppleDRIQueryDirectRenderingCapable requests
Return an error to the caller rather than crashing the server on invalid screens. Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
This commit is contained in:
parent
959e8f23af
commit
b3572c0d1a
|
@ -123,6 +123,10 @@ ProcAppleDRIQueryDirectRenderingCapable(register ClientPtr client)
|
|||
rep.length = 0;
|
||||
rep.sequenceNumber = client->sequence;
|
||||
|
||||
if (stuff->screen >= screenInfo.numScreens) {
|
||||
return BadValue;
|
||||
}
|
||||
|
||||
if (!DRIQueryDirectRenderingCapable(screenInfo.screens[stuff->screen],
|
||||
&isCapable)) {
|
||||
return BadValue;
|
||||
|
|
Loading…
Reference in New Issue
Block a user