From db55aef48ca9a4d00fa2c84965f86a779ce9dd88 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 13 Mar 2012 21:21:33 +0000 Subject: Fix potential memory overrun. Taken from Sumatra.patch - Many thanks. --- draw/draw_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'draw') 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++; -- cgit v1.2.3