summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/fitz/draw-affine.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/fitz/draw-affine.c b/source/fitz/draw-affine.c
index 61f7eb3f..14383612 100644
--- a/source/fitz/draw-affine.c
+++ b/source/fitz/draw-affine.c
@@ -4044,6 +4044,10 @@ fz_paint_image_imp(fz_pixmap *dst, const fz_irect *scissor, fz_pixmap *shape, fz
if (dolerp)
{
+ /* image size overflows 16.16 fixed point math */
+ if (sw >= 32768 || sh >= 32768)
+ return;
+
u -= 32768;
v -= 32768;
sw = (sw<<16) + 32768;