diff options
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r-- | nx-X11/programs/Xserver/GL/glx/glxcmds.c | 4 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/GL/glx/glxcmdsswap.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/GL/glx/glxcmds.c b/nx-X11/programs/Xserver/GL/glx/glxcmds.c index ca5eee82a..02f3ba7f2 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxcmds.c +++ b/nx-X11/programs/Xserver/GL/glx/glxcmds.c @@ -1484,7 +1484,7 @@ int __glXRender(__GLXclientState *cl, GLbyte *pc) /* variable size command */ extra = (*entry->varsize)(pc + __GLX_RENDER_HDR_SIZE, False); if (extra < 0) { - extra = 0; + return BadLength; } if (cmdlen != __GLX_PAD(entry->bytes + extra)) { return BadLength; @@ -1601,7 +1601,7 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc) */ extra = (*entry->varsize)(pc + __GLX_RENDER_LARGE_HDR_SIZE, False); if (extra < 0) { - extra = 0; + return BadLength; } /* large command's header is 4 bytes longer, so add 4 */ if (cmdlen != __GLX_PAD(entry->bytes + 4 + extra)) { diff --git a/nx-X11/programs/Xserver/GL/glx/glxcmdsswap.c b/nx-X11/programs/Xserver/GL/glx/glxcmdsswap.c index 595e814e5..027cba709 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxcmdsswap.c +++ b/nx-X11/programs/Xserver/GL/glx/glxcmdsswap.c @@ -535,7 +535,7 @@ int __glXSwapRender(__GLXclientState *cl, GLbyte *pc) /* variable size command */ extra = (*entry->varsize)(pc + __GLX_RENDER_HDR_SIZE, True); if (extra < 0) { - extra = 0; + return BadLength; } if (cmdlen != __GLX_PAD(entry->bytes + extra)) { return BadLength; @@ -659,7 +659,7 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc) */ extra = (*entry->varsize)(pc + __GLX_RENDER_LARGE_HDR_SIZE, True); if (extra < 0) { - extra = 0; + return BadLength; } /* large command's header is 4 bytes longer, so add 4 */ if (cmdlen != __GLX_PAD(entry->bytes + 4 + extra)) { |