Return value from xcb_generate_id() not checked
Submitted by Alexey Feldgendler
Assigned to Jamey Sharp
xcb_generate_id() returns -1 (well, ~0) under some error conditions. However, _XIDHandler() in Xlib doesn't check for it, and if this value is returned, it's saved in dpy->xcb->next_xid and causes an assertion failure in _XAllocID() at a later point.
This is my guess as to what happened here: https://bugs.kde.org/show_bug.cgi?id=192468 -- I mean, it's the only concievable codepath leading to that assertion being triggered.
The return value from xcb_generate_id() should be checked, and errors should be handled gracefully.
Version: 7.3 (2007.09)