diff options
author | Uli Schlachter <psychon@znc.in> | 2022-02-16 17:40:00 +0100 |
---|---|---|
committer | Uli Schlachter <psychon@znc.in> | 2022-02-16 17:53:49 +0100 |
commit | 01c93c7f36d38fe655fc6daf59060c97659a4094 (patch) | |
tree | 982b071dfdd9b4a6db9ae4312a3d7ac4dfea3624 /src/cairo-script-surface.c | |
parent | bdb4d058685f9ad4981b233661f4ee23e18140a5 (diff) | |
download | cairo-01c93c7f36d38fe655fc6daf59060c97659a4094.tar.gz |
Fix bug #535 in cairo-script
cairo-script has a special case for drawing a set of rectangles. The
rectangle detection can trip over a "degenerate rectangle": Just a
horizontal line. It detects the line as the beginning of a rectangle and
then claims CAIRO_STATUS_INVALID_PATH_DATA when the other sides of the
rectangle are missing.
This commit simply changes the return value to
CAIRO_INT_STATUS_UNSUPPORTED to trigger a fallback to the generate case.
Test case is a straight-forward adaption from the original bug report.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/535
Diffstat (limited to 'src/cairo-script-surface.c')
-rw-r--r-- | src/cairo-script-surface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairo-script-surface.c b/src/cairo-script-surface.c index ca9bafbb7..3310ef86a 100644 --- a/src/cairo-script-surface.c +++ b/src/cairo-script-surface.c @@ -1882,7 +1882,7 @@ _emit_path_boxes (cairo_script_surface_t *surface, if (! _cairo_path_fixed_iter_at_end (&iter)) { _cairo_boxes_fini (&boxes); - return CAIRO_STATUS_INVALID_PATH_DATA; + return CAIRO_INT_STATUS_UNSUPPORTED; } for (chunk = &boxes.chunks; chunk; chunk = chunk->next) { |