aboutsummaryrefslogtreecommitdiff
path: root/gzlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'gzlib.c')
-rw-r--r--gzlib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gzlib.c b/gzlib.c
index ced2cb8..3e344f9 100644
--- a/gzlib.c
+++ b/gzlib.c
@@ -331,6 +331,8 @@ int ZEXPORT gzbuffer(file, size)
331 return -1; 331 return -1;
332 332
333 /* check and set requested size */ 333 /* check and set requested size */
334 if ((size << 1) < size)
335 return -1; /* need to be able to double it */
334 if (size < 2) 336 if (size < 2)
335 size = 2; /* need two bytes to check magic header */ 337 size = 2; /* need two bytes to check magic header */
336 state->want = size; 338 state->want = size;