Code review comment for lp:~compiz-team/compiz/compiz.fix_1006335

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

There's a risk of crashing, by assuming there are still only XEventsQueued by the time we consume them all. The server might have more events ready by then. More than we sized the event vector for, so either:
        XNextEvent (dpy, &(*it));
or
        it++
will crash. Because it is now past the end of the vector.

But it's a simple fix. Just use reserve() instead of resize() and push_back instead of writing to *it.

review: Needs Fixing

« Back to merge proposal