pdf: Fix potential null ptr deref when creating smask groups (CID #1159559)
commit9b0355a591125a8d7fe20daa82504759e6d472e7
authorBryce Harrington <bryce@bryceharrington.org>
Tue, 12 Jun 2018 22:08:31 +0000 (12 15:08 -0700)
committerBryce Harrington <bryce@bryceharrington.org>
Wed, 13 Jun 2018 22:21:50 +0000 (13 15:21 -0700)
tree0af36c74f9194f65ee1b175b6979a6668d22e7c9
parent9c56502e064b7896207a80e45c519ad4847e231c
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>
src/cairo-pdf-surface.c