summaryrefslogtreecommitdiff
path: root/fitz/stm_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'fitz/stm_buffer.c')
-rw-r--r--fitz/stm_buffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fitz/stm_buffer.c b/fitz/stm_buffer.c
index 58c69996..f7da8289 100644
--- a/fitz/stm_buffer.c
+++ b/fitz/stm_buffer.c
@@ -5,6 +5,8 @@ fz_newbuffer(int size)
{
fz_buffer *b;
+ size = size > 1 ? size : 16;
+
b = fz_malloc(sizeof(fz_buffer));
b->refs = 1;
b->ownsdata = 1;