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