summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-02-08 15:26:30 +0100
committerIan Romanick <ian.d.romanick@intel.com>2009-04-09 15:15:33 -0700
commit83e14773c5bf33700c9cc688aa9aa49efb66fbf7 (patch)
tree42aa41089f32ad5986cc35175ebb2f2e69c516b5
parent46059378433970a5557bd667e93b3d61b14caa5a (diff)
downloadmesa-83e14773c5bf33700c9cc688aa9aa49efb66fbf7.tar.gz
dri2: Don't crash if the server returns more buffers than expected.
(cherry picked from commit f967e8b507990f0d7986e0f83924e6587d70200d)
-rw-r--r--src/glx/x11/dri2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glx/x11/dri2.c b/src/glx/x11/dri2.c
index 3b48cd9c1ca..f967432b994 100644
--- a/src/glx/x11/dri2.c
+++ b/src/glx/x11/dri2.c
@@ -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);