mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 20:28:02 +02:00
pdf: Fix potential null ptr deref when creating smask groups (CID #1159559)
Patch 37a22669 improved performance by using bounding box extents.
However, the code appears to be incorrect. If extents is non-NULL it
copies its contents to group->extents, otherwise it sets group->extents
to sensible defaults, but then goes ahead and tries to copy the
undefined contents. This second copy is unnecessary if extents is
non-NULL and will cause a crash if it is NULL.
Drop the extra copy, guessing it's just a typo.
Coverity ID: #1159559
Signed-off-by: Bryce Harrington <bryce@bryceharrington.org>
Reviewed-By: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
9c56502e06
commit
9b0355a591
1 changed files with 0 additions and 1 deletions
|
|
@ -1291,7 +1291,6 @@ _cairo_pdf_surface_create_smask_group (cairo_pdf_surface_t *surface,
|
|||
group->extents.width = surface->width;
|
||||
group->extents.height = surface->height;
|
||||
}
|
||||
group->extents = *extents;
|
||||
|
||||
return group;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue