summaryrefslogtreecommitdiff
path: root/draw
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2011-01-17 11:43:56 +0000
committerRobin Watts <robin.watts@artifex.com>2011-01-17 11:43:56 +0000
commit34182c66e954831dd455a07c601dfa6e01536ac8 (patch)
tree6fde71d313299a3f20b2e8c9b64372fb41b2c267 /draw
parent07a9f392acf314d6ebf812a6b857224e7b369214 (diff)
downloadmupdf-34182c66e954831dd455a07c601dfa6e01536ac8.tar.xz
Fix out of bound memory access in smooth scaling single column code.
Diffstat (limited to 'draw')
-rw-r--r--draw/imagesmooth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/draw/imagesmooth.c b/draw/imagesmooth.c
index 72345ed6..341e0377 100644
--- a/draw/imagesmooth.c
+++ b/draw/imagesmooth.c
@@ -925,7 +925,7 @@ scale_single_col(unsigned char *dst, unsigned char *src, fz_weights *weights, in
/* Scale the next pixel in the column */
min = *contrib++;
len = *contrib++;
- min = (src_w-min)*n;
+ min = src_w-min*n;
for (j = 0; j < n; j++)
tmp[j] = 0;
while (len-- > 0)