diff options
author | Robin Watts <robin.watts@artifex.com> | 2013-07-22 10:32:30 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-07-22 10:32:30 +0100 |
commit | 9371668e28e5063ae42b8cd1906f27ee7b33379e (patch) | |
tree | 7f03a52d49d8d32e78dce513ffe88cfe8b37e75b /source | |
parent | 42eb247ea0c69ba8cc249b1bb44fafcdcbdd2621 (diff) | |
download | mupdf-9371668e28e5063ae42b8cd1906f27ee7b33379e.tar.xz |
Bug 694431: Fix potential infinite loop.
Thanks to "willus" for pointing out this problem.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |