diff options
author | Michel Dänzer <[email protected]> | 2018-06-01 18:59:36 +0200 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2018-06-05 18:56:43 +0200 |
commit | 6b8f3724c83959e62b1be0330d6d14e58f91dc5b (patch) | |
tree | 3b4c6ea1ab157988da7b137e53f8838dff45da6e /src/glx/glxcmds.c | |
parent | c765c39ea73178c81a8bf88fe57c8d39a01dc57d (diff) |
glx: Fix number of property values to read in glXImportContextEXT
We were trying to read twice as many as the X server sent us, which
upset XCB:
[xcb] Too much data requested from _XRead
[xcb] This is most likely caused by a broken X extension library
[xcb] Aborting, sorry about that.
glx-free-context: ../../src/xcb_io.c:732: _XRead: Assertion `!xcb_xlib_too_much_data_requested' failed.
Fixing this takes 3 GLX piglit tests from crash to pass.
Fixes: 085216295033 "glx: Be more tolerant in glXImportContext (v2)"
Reviewed-by: Adam Jackson <[email protected]>
Diffstat (limited to 'src/glx/glxcmds.c')
-rw-r--r-- | src/glx/glxcmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glx/glxcmds.c b/src/glx/glxcmds.c index 949c2a59314..e8485acd809 100644 --- a/src/glx/glxcmds.c +++ b/src/glx/glxcmds.c @@ -1463,7 +1463,7 @@ glXImportContextEXT(Display *dpy, GLXContextID contextID) if (_XReply(dpy, (xReply *) & reply, 0, False) && reply.n < (INT32_MAX / 2)) { - for (i = 0; i < reply.n * 2; i++) { + for (i = 0; i < reply.n; i++) { int prop[2]; _XRead(dpy, (char *)prop, sizeof(prop)); |