Files
pkgsrc-ng/x11/modular-xorg-server112/patches/patch-glx_unpack.h
2016-01-21 23:41:46 +01:00

18 lines
671 B
C

$NetBSD: patch-glx_unpack.h,v 1.1 2015/04/03 09:46:18 tnn Exp $
X.Org Security Advisory: Dec. 9, 2014
Protocol handling issues in X Window System servers
--- glx/unpack.h.orig 2012-05-17 17:09:02.000000000 +0000
+++ 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, \