[Xcb] PATCH: XCBParseDisplay's return value
Jamey Sharp
jamey at minilop.net
Mon Dec 12 15:45:52 PST 2005
On Sun, Jul 17, 2005 at 05:51:33PM -0700, Travis Spencer wrote:
> XCBParseDisplay returns the results of sscanf which returns the number
> of input items assigned or EOF on error.
> ...
> However, the negation of EOF which is typically -1 (though not
> mandated to be) is false. So, even if XCBParseDisplay's sscanf fails,
> XCBConnectBasic interprets it as success.
Actually there were lots of bugs in XCBParseDisplay's handling of bad
input. I've just committed a complete re-write that uses strtoul instead
of sscanf.
Now XCB passes its entire test suite. Yay! Except the suite only tests
XCBParseDisplay, so this isn't actually much of an accomplishment.
Thanks for pointing out this problem, um, five months ago. ;-)
--Jamey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20051212/3d8a4722/attachment.pgp
More information about the Xcb
mailing list