[cairo] [PATCH] xcb: Fix error reporting if fallback fails

Uli Schlachter psychon at znc.in
Sat Jun 10 12:34:03 UTC 2017


On 07.06.2017 02:51, Bryce Harrington wrote:
[...]
>> [No test for this since in the case were I ran into this, _get_image()
>> failed because the X11 server closed the connection. No idea why it
>> did that.]
> 
> Steps to repro the issue (or a bug # if it's been reported) might be
> nice, but the change looks sensible enough so:

By now I figured out:

At my university, there was an ancient version of x11vnc which
mis-applied the maximum request length for X11 requests. Also, instead
of the required BadLength error, it just closed the client's connection.
(I tried to find the fixes for this in some Git repositories, but I
failed. But I did check that this does not happen with newer versions of
x11vnc.)

Thus, when the window manager called awesome tried to set a wallpaper,
the server closed the X11 connection. This caused some following
wallpaper-related things to fail and then cairo dereferenced a NULL pointer.

Since the above was never reported through cairo's bugzilla, there is no
bug number for it. Also, due to "old x11vnc version" I do not have any
"good" reproduction steps.

The best I could offer: Hack the source code so that the fallback fails
and returns a surface in an error state.

> Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>

Sorry, I didn't see this before pushing the patch.

Cheers,
Uli
-- 
99 little bugs in the code
99 little bugs in the code
Take one down, patch it around
117 little bugs in the code
  -- @irqed


More information about the cairo mailing list