summaryrefslogtreecommitdiff
path: root/source/fitz/image.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-11-01 15:07:50 +0100
committerTor Andersson <tor.andersson@artifex.com>2016-11-01 15:07:50 +0100
commitfeee1fce120ddd0273fab03a32912487468f4c29 (patch)
tree49622130d8bfe414e4f76153d7763a153fa61a21 /source/fitz/image.c
parentfd1976035e0b7614bedd440763fbe17a61a583d7 (diff)
downloadmupdf-feee1fce120ddd0273fab03a32912487468f4c29.tar.xz
Don't dereference NULL subarea when rasterizing display list images.
Diffstat (limited to 'source/fitz/image.c')
-rw-r--r--source/fitz/image.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/fitz/image.c b/source/fitz/image.c
index 7373147f..d88cc578 100644
--- a/source/fitz/image.c
+++ b/source/fitz/image.c
@@ -575,11 +575,13 @@ fz_get_pixmap_from_image(fz_context *ctx, fz_image *image, const fz_irect *subar
if (image->scalable)
{
/* If the image is scalable, we always want to re-render and never cache. */
- fz_irect subarea_copy = *subarea;
+ fz_irect subarea_copy;
+ if (subarea)
+ subarea_copy = *subarea;
l2factor_remaining = 0;
if (dw) *dw = w;
if (dh) *dh = h;
- return image->get_pixmap(ctx, image, &subarea_copy, image->w, image->h, &l2factor_remaining);
+ return image->get_pixmap(ctx, image, subarea ? &subarea_copy : NULL, image->w, image->h, &l2factor_remaining);
}
/* Clamp requested image size, since we never want to magnify images here. */