[Xcb] Non Null-Terminated String in Text Property Reply

Julien Danjou julien at danjou.info
Mon Sep 10 03:13:23 PDT 2012


On Mon, Sep 10 2012, Bastien Dejean wrote:

> It seems that the `strings` attribute of a
> `xcb_ewmh_get_utf8_strings_reply_t` is not null-terminated.
>
> (*Proof*: `strlen(strings)` can be greater that `strings_len`.)
>
> Maybe this could be mentioned in the documentation (I presume I should
> have induced it from the existence of the `strings_len` attribute).

Yes, that's obvious when you used XCB and did your request/reply
manually for a long time, nothing is ever null terminated. But you have
the length. :)

-- 
Julien Danjou
-- Free Software hacker & freelance
-- http://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20120910/8fabc388/attachment.pgp>


More information about the Xcb mailing list