diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-11-01 15:07:50 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-11-01 15:07:50 +0100 |
commit | feee1fce120ddd0273fab03a32912487468f4c29 (patch) | |
tree | 49622130d8bfe414e4f76153d7763a153fa61a21 | |
parent | fd1976035e0b7614bedd440763fbe17a61a583d7 (diff) | |
download | mupdf-feee1fce120ddd0273fab03a32912487468f4c29.tar.xz |
Don't dereference NULL subarea when rasterizing display list images.
-rw-r--r-- | source/fitz/image.c | 6 |
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. */ |