Hi, On 21 January 2016 at 08:58, Olivier Fourdan <[email protected]> wrote: > XkbGetKeyboardByName relies on flags to read the data from the server. > > If the X server sends us the wrong flags or if a subreply is smaller > than it should be, XkbGetKeyboardByName will not read all the available > data and leave data in the buffer, which will cause the next _XReply() > to fail with: > > [xcb] Extra reply data still left in queue > [xcb] This is most likely caused by a broken X extension library > [xcb] Aborting, sorry about that. > xcb_io.c:576: _XReply: Assertion `!xcb_xlib_extra_reply_data_left' failed. > Aborted > > Check if there is some extra data left at the end of > XkbGetKeyboardByName() and discard that data if any is found.
Thanks, that looks really good! (And I almost wonder if we shouldn't cache data from the last reply - request/sequence number, etc - to make that error a bit more friendly.) > @@ -204,12 +215,16 @@ XkbGetKeyboardByName(Display *dpy, > if (status != Success) > goto BAILOUT; > } > + if (extraLen > 0) > + _discardExtraLen(dpy, extraLen); > UnlockDisplay(dpy); > SyncHandle(); > return xkb; This case seems like it shouldn't return success, but instead jump to BAILOUT; if there's extra unconsumed data, either the server is broken, or we've missed something. With that fixed: Reviewed-by: Daniel Stone <[email protected]> Cheers, Daniel _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
