From 0c86abf954ca4a5f00c26f6600acac93f9fc3538 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 28 Feb 2017 17:15:40 +0000 Subject: Bug 697395: Fix underflow in special case scaler. When scaling a single row pixmap with a flip, I was getting the offset to the far end of the line wrong due to forgetting to allow for the alpha plane. Fixed here. --- source/fitz/draw-scale-simple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/fitz/draw-scale-simple.c b/source/fitz/draw-scale-simple.c index 1525c7b5..1d590922 100644 --- a/source/fitz/draw-scale-simple.c +++ b/source/fitz/draw-scale-simple.c @@ -1294,7 +1294,7 @@ scale_single_row(unsigned char * restrict dst, int dstride, const unsigned char tmp[j] = 128; if (weights->flip) { - dst += (weights->count-1)*n; + dst += (weights->count-1)*nf; for (i=weights->count; i > 0; i--) { min = *contrib++; -- cgit v1.2.3