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