Skip to content

cairo-xlib: Check for maximum surface size

Uli Schlachter requested to merge psychon/cairo:xlib-max-size-similar into master

X11 use uint16_t for the width/height of things. Anything too large will be truncated when sending the request to the X11 server. This commit adds a size check to a function that did not check things and then later caused a segmentation fault.

Not adding a test case because the test case from the below bug report allocates 3,5 GiB of memory, which I find too much for a test.

Fixes: #414 (closed) Signed-off-by: Uli Schlachter psychon@znc.in

Merge request reports