diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-07-08 17:56:38 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-07-08 17:57:39 +0100 |
commit | 16c8afb8322e33a5177251cb56688406c1ec02e5 (patch) | |
tree | d88bf60b53665ef1be88472b385be8213cc75240 /source/fitz | |
parent | d08fbf57aa74e3947f198c03aaefd5356425cda3 (diff) | |
download | mupdf-16c8afb8322e33a5177251cb56688406c1ec02e5.tar.xz |
Bug 696872: Avoid trying to paint with zero alpha.
Short circuit any attempt to paint a pixmap with zero alpha.
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/draw-paint.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |