diff --git a/glx/glxcmds.c b/glx/glxcmds.c index e0890e982b..9458587b7f 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -2195,6 +2195,9 @@ __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc) return BadLength; } + if (dataBytes > cmdlen) + return BadLength; + /* ** Make enough space in the buffer, then copy the entire request. */