summaryrefslogtreecommitdiff
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 d16b249..e8cb479 100644
--- a/gzlib.c
+++ b/gzlib.c
@@ -247,8 +247,8 @@ int ZEXPORT gzbuffer(file, size)
247 return -1; 247 return -1;
248 248
249 /* check and set requested size */ 249 /* check and set requested size */
250 if (size == 0) 250 if (size < 2)
251 return -1; 251 size = 2; /* need two bytes to check magic header */
252 state->want = size; 252 state->want = size;
253 return 0; 253 return 0;
254} 254}