[Xcb] Invalid XIDs

Barton C Massey bart at cs.pdx.edu
Mon Jan 26 09:34:24 PST 2009


In message <eaa105840901260835i1b979988odd52c7622ba28b90 at mail.gmail.com> you wrote:
> On Mon, Jan 26, 2009 at 1:30 AM, Barton C Massey wrote:
> > In message <961fa2b40901251643x5155f7bcpf2422b930eec8103 at mail.gmail.com> you wrote:
> >> (It's also unclear to me that there's anything anyone can do with an
> >> error return from xcb_generate_id -- does anyone even check?  Is it
> >> even guaranteed that (uint32_t)-1 indicates an error, rather than a
> >> valid XID?)
> >
> > Well, we control the XCB spec, so I say "yes" on the
> > guarantee. :-)
> 
> Better than that, the most significant three bits are reserved by the
> X protocol spec (page 10). So no valid XID will ever have those bits
> set.

I knew that. :-) :-)  Thanks much for the catch.

> > Which means that we should check for that
> > case in the xcb_generate_id code.  Noted and fixed in my
> > branch.
> 
> No need (see above), but extra validation doesn't hurt.

Naw, I'll rip it out---it was really ugly and I hated to put
it there.  Thanks again.

	Bart


More information about the Xcb mailing list