glx: Handle failure to create the pixmap backing the pbuffer
We happen not to sanitize the width/height we pass to CreatePixmap here, oops. It's not exploitable, but it's certainly a crash, so let's just throw BadAlloc instead. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
22fbfdcb31
commit
b99f797540
|
@ -1416,6 +1416,8 @@ DoCreatePbuffer(ClientPtr client, int screenNum, XID fbconfigId,
|
|||
width, height,
|
||||
config->rgbBits, 0);
|
||||
__glXleaveServer(GL_FALSE);
|
||||
if (!pPixmap)
|
||||
return BadAlloc;
|
||||
|
||||
/* Assign the pixmap the same id as the pbuffer and add it as a
|
||||
* resource so it and the DRI2 drawable will be reclaimed when the
|
||||
|
|
Loading…
Reference in New Issue
Block a user