From 9371668e28e5063ae42b8cd1906f27ee7b33379e Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Mon, 22 Jul 2013 10:32:30 +0100 Subject: Bug 694431: Fix potential infinite loop. Thanks to "willus" for pointing out this problem. --- source/fitz/buffer.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/fitz/buffer.c') diff --git a/source/fitz/buffer.c b/source/fitz/buffer.c index 388e0461..3d80fbbd 100644 --- a/source/fitz/buffer.c +++ b/source/fitz/buffer.c @@ -87,6 +87,8 @@ static void fz_ensure_buffer(fz_context *ctx, fz_buffer *buf, int min) { int newsize = buf->cap; + if (newsize < 16) + newsize = 16; while (newsize < min) { newsize = (newsize * 3) / 2; -- cgit v1.2.3