diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2015-11-03 18:42:14 +0100 |
---|---|---|
committer | Hans Kristian Rosbach <hk-git@circlestorm.org> | 2015-11-03 18:43:48 +0100 |
commit | 48e985b618b95a0e49587cbe6b18aea7f9117075 (patch) | |
tree | b9b85f8a4ca1b9dca427ea930e067088f3134bcd /gzlib.c | |
parent | 0c1581a5171b6793deccb9632a92f05d9691b3bb (diff) |
Improve speed of gzprintf() in transparent mode.
A few minor modifications done to help with conflicts.
Diffstat (limited to 'gzlib.c')
-rw-r--r-- | gzlib.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -251,6 +251,8 @@ int ZEXPORT gzbuffer(gzFile file, unsigned 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; |