Skip to content

Avoid request counter truncation in replies map after 2**32 requests

Ran Benita requested to merge bluetech/libxcb:trunc into master

The c->in request counters are uint64_t, and can realistically go over 2**32 over a lifetime of a client. The c->in->replies map however uses unsigned int keys and the passed request numbers are silently truncated.

I haven't analyzed in depth what happens what it wraps around but it's probably nothing good.

The only user of the xcb_list.c map code is c->in->replies, so just change it to use uint64_t keys.

Signed-off-by: Ran Benita ran@unusedvar.com

Edited by Ran Benita

Merge request reports