[Xcb] zeroing out

Barton C Massey bart at cs.pdx.edu
Fri Dec 30 16:49:43 PST 2005


I committed the obvious fix to xcbxvinfo.c just now, along
with a bunch of fixes for GCC warnings.  (Shouldn't -Wall be
turned on by default?)

While we should definitely zero padding bytes as
appropriate, I'm not sure that helps here---these bytes
aren't padding, but rather are left-over bytes in a buffer.

Anyone remember offhand whether null bytes are allowed in
the count/chars strings returned by X requests?  Anyone know
whether there must be a space in the reply for a trailing
null byte?  If either of these things are wrong, then XCB
isn't reasonably going to be able to return C strings...

	Bart

In message <Pine.LNX.4.44.0512301617420.11185-100000 at diane.unet.brandeis.edu> you wrote:
> I seem to remember a discussion about zeroing out the reply before sending 
> it to the client.  I finally have a decent xv going and my xvinfo 
> (xcbxvinfo in xcb-demos) works well except that often times at the end of 
> strings there are other characters.  The size for a string returned at the 
> end of a reply seems to be the size of the string and the padding until 
> the end of the reply.  If you run xcbxvinfo you'll see what I mean.
> 
> Jeremy
> 
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb


More information about the Xcb mailing list