diff options
Diffstat (limited to 'xorg-server/glx/unpack.h')
-rw-r--r-- | xorg-server/glx/unpack.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xorg-server/glx/unpack.h b/xorg-server/glx/unpack.h index 52fba74e1..2b1ebcf02 100644 --- a/xorg-server/glx/unpack.h +++ b/xorg-server/glx/unpack.h @@ -83,7 +83,8 @@ extern xGLXSingleReply __glXReply; ** pointer. */ #define __GLX_GET_ANSWER_BUFFER(res,cl,size,align) \ - if ((size) > sizeof(answerBuffer)) { \ + if (size < 0) return BadLength; \ + else if ((size) > sizeof(answerBuffer)) { \ int bump; \ if ((cl)->returnBufSize < (size)+(align)) { \ (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \ |