aboutsummaryrefslogtreecommitdiff
path: root/gzlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'gzlib.c')
-rw-r--r--gzlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gzlib.c b/gzlib.c
index 2b446c4..29fc448 100644
--- a/gzlib.c
+++ b/gzlib.c
@@ -308,8 +308,8 @@ int ZEXPORT gzbuffer(gzFile file, unsigned size) {
308 /* check and set requested size */ 308 /* check and set requested size */
309 if ((size << 1) < size) 309 if ((size << 1) < size)
310 return -1; /* need to be able to double it */ 310 return -1; /* need to be able to double it */
311 if (size < 2) 311 if (size < 8)
312 size = 2; /* need two bytes to check magic header */ 312 size = 8; /* needed to behave well with flushing */
313 state->want = size; 313 state->want = size;
314 return 0; 314 return 0;
315} 315}