summaryrefslogtreecommitdiff
path: root/draw
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2011-05-19 19:41:29 +0100
committerRobin Watts <Robin.Watts@artifex.com>2011-05-19 19:41:29 +0100
commite0c00ccad1e67b0706e4337ad33e711ea069f58e (patch)
treee339428614e6c6efb4f3a8e5ba3cb3e86c7c7445 /draw
parent45bf62dc4e7271c25ee53e1e2ce0de51955132de (diff)
downloadmupdf-e0c00ccad1e67b0706e4337ad33e711ea069f58e.tar.xz
Fix Bug 692196: segv in scale_single_row.
Thanks to Zeniko for finding/reporting/patching the problem. Due to a pointer miscalculation we were overwriting memory. Simple fix.
Diffstat (limited to 'draw')
-rw-r--r--draw/draw_scale.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/draw/draw_scale.c b/draw/draw_scale.c
index a6fb2817..9b94702e 100644
--- a/draw/draw_scale.c
+++ b/draw/draw_scale.c
@@ -872,7 +872,7 @@ scale_single_row(unsigned char *dst, unsigned char *src, fz_weights *weights, in
}
dst -= 2*n;
}
- dst += n;
+ dst += n * (weights->count+1);
}
else
{