summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-02-28 17:15:40 +0000
committerRobin Watts <robin.watts@artifex.com>2017-03-01 10:36:48 +0000
commit0c86abf954ca4a5f00c26f6600acac93f9fc3538 (patch)
tree37c5f309c588ea0b20c5208c68db7cca99fc8dc3 /source
parent6b8eb31b79d235e0d05058afea1ea9005be6c147 (diff)
downloadmupdf-0c86abf954ca4a5f00c26f6600acac93f9fc3538.tar.xz
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.
Diffstat (limited to 'source')
-rw-r--r--source/fitz/draw-scale-simple.c2
1 files changed, 1 insertions, 1 deletions
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++;