diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-03-13 21:21:33 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-03-13 21:21:33 +0000 |
commit | db55aef48ca9a4d00fa2c84965f86a779ce9dd88 (patch) | |
tree | 532f4dacc6d9be4b3c5cb480a433ab6fe19a5960 /draw/draw_device.c | |
parent | 9ccaed06546b9ca260b29707fbd3327c3af9314d (diff) | |
download | mupdf-db55aef48ca9a4d00fa2c84965f86a779ce9dd88.tar.xz |
Fix potential memory overrun.
Taken from Sumatra.patch - Many thanks.
Diffstat (limited to 'draw/draw_device.c')
-rw-r--r-- | draw/draw_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/draw/draw_device.c b/draw/draw_device.c index 76f934bd..b9c5866d 100644 --- a/draw/draw_device.c +++ b/draw/draw_device.c @@ -99,7 +99,7 @@ push_stack(fz_draw_device *dev) { fz_draw_state *state; - if (dev->top == dev->stack_max) + if (dev->top == dev->stack_max-1) fz_grow_stack(dev); state = &dev->stack[dev->top]; dev->top++; |