Bug reported in the Debian BTS a couple years ago. The manpage of XGetCommand states: "If sufficient memory can be allocated to contain the string list, XGetCommand fills in the argv_return and argc_return arguments and returns a nonzero status. Otherwise, it returns a zero status." Looking at the code, this looks wrong. The function also returns 0 when another error occurs, no only in case of memory allocation failure. The manpage should say something like: "If no error occurs and sufficient memory can be allocated to contain the string list, ..." Thank you
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Fixed in 6f0764d4b56f64786b4980839ca262f10a51af6f
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.