Mesa (master): dri2: Don' t crash if the server returns more buffers than expected.
Eric Anholt
anholt at kemper.freedesktop.org
Tue Feb 10 18:45:36 PST 2009
Module: Mesa
Branch: master
Commit: f967e8b507990f0d7986e0f83924e6587d70200d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f967e8b507990f0d7986e0f83924e6587d70200d
Author: Eric Anholt <eric at anholt.net>
Date: Sun Feb 8 15:26:30 2009 +0100
dri2: Don't crash if the server returns more buffers than expected.
---
src/glx/x11/dri2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/glx/x11/dri2.c b/src/glx/x11/dri2.c
index 3b48cd9..f967432 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);
More information about the mesa-commit
mailing list