mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-16 00:30:41 +02:00
_clip_and_composite_trapezoids: Avoid NULL pointer dereference due to OOM.
This closes bug #6197:
Null pointer dereference on OOM in _clip_and_composite_trapezoids()
https://bugs.freedesktop.org/show_bug.cgi?id=6197
(cherry picked from 6f0d8eedc5 commit)
This commit is contained in:
parent
5e399f8778
commit
440bb68ef2
1 changed files with 3 additions and 0 deletions
|
|
@ -1439,6 +1439,9 @@ _cairo_surface_clip_and_composite_trapezoids (cairo_pattern_t *src,
|
|||
return status;
|
||||
|
||||
clear_region = _cairo_region_create_from_rectangle (&extents);
|
||||
if (clear_region == NULL)
|
||||
return CAIRO_STATUS_NO_MEMORY;
|
||||
|
||||
status = _cairo_clip_intersect_to_region (clip, clear_region);
|
||||
if (status)
|
||||
return status;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue