diff options
Diffstat (limited to 'gzlib.c')
-rw-r--r-- | gzlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 | } |