From 16c8afb8322e33a5177251cb56688406c1ec02e5 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 8 Jul 2016 17:56:38 +0100 Subject: Bug 696872: Avoid trying to paint with zero alpha. Short circuit any attempt to paint a pixmap with zero alpha. --- source/fitz/draw-paint.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source') diff --git a/source/fitz/draw-paint.c b/source/fitz/draw-paint.c index d2883757..afeb989f 100644 --- a/source/fitz/draw-paint.c +++ b/source/fitz/draw-paint.c @@ -2123,6 +2123,9 @@ fz_paint_pixmap(fz_pixmap * restrict dst, const fz_pixmap * restrict src, int al int x, y, w, h, n, da, sa; fz_span_painter_t *fn; + if (alpha == 0) + return; + assert(dst->n - dst->alpha == src->n - src->alpha); fz_pixmap_bbox_no_ctx(dst, &bbox); -- cgit v1.2.3