mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
dri2: Don't crash if the server returns more buffers than expected.
This commit is contained in:
parent
680c708dee
commit
f967e8b507
1 changed files with 1 additions and 1 deletions
|
|
@ -253,7 +253,7 @@ DRI2Buffer *DRI2GetBuffers(Display *dpy, XID drawable,
|
|||
*height = rep.height;
|
||||
*outCount = rep.count;
|
||||
|
||||
buffers = Xmalloc(count * sizeof buffers[0]);
|
||||
buffers = Xmalloc(rep.count * sizeof buffers[0]);
|
||||
if (buffers == NULL) {
|
||||
_XEatData(dpy, rep.count * sizeof repBuffer);
|
||||
UnlockDisplay(dpy);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue