diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2015-07-05 18:14:53 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2015-07-05 18:14:53 -0700 |
commit | 95698093f023852ca4365df307c19a1d7cfa3687 (patch) | |
tree | 743b907c5449f617343e8bec546eabbb650df0a8 /gzlib.c | |
parent | 8a979f6c7986574e37316148cd8ca440c3bc08a3 (diff) | |
download | zlib-95698093f023852ca4365df307c19a1d7cfa3687.tar.gz |
Improve speed of gzprintf() in transparent mode.
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) return -1; /* check and set requested size */ + if ((size << 1) < size) + return -1; /* need to be able to double it */ if (size < 2) size = 2; /* need two bytes to check magic header */ state->want = size; |