summaryrefslogtreecommitdiff
path: root/infback.c
diff options
context:
space:
mode:
authorjmadill <jmadill@chromium.org>2016-06-20 06:58:52 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-20 14:01:19 +0000
commitbf2aebeacfc84bf69ff964edbf212ec3aed6430c (patch)
treedfa65fc6e4ed637adcd0a4e9a13d353eef01f543 /infback.c
parent90f7dad71a47e992425d7deda7970643990288f3 (diff)
downloadzlib-bf2aebeacfc84bf69ff964edbf212ec3aed6430c.tar.gz
Revert of Update Zlib to version 1.2.8 (patchset #10 id:220001 of https://codereview.chromium.org/1955383002/ )
Reason for revert: Broke the Windows Debug GPU FYI builder: https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Win%20Builder%20%28dbg%29/builds/41421 fx_zlib.gzlib.obj : error LNK2005: _gzopen_w already defined in zlib.gzlib.obj initial\chrome.dll : fatal error LNK1169: one or more multiply defined symbols found Possibly because they use shared components with a GYP build. Original issue's description: > Update Zlib to version 1.2.8 > > merge the latest open source zlib into chromium external projects > > Version 1.2.8 fixes a very rare bug in decompression. All users are encouraged to upgrade immediately. Version 1.2.8 also has these improvements: > - Add new inflateGetDictionary() function > - Fix bug where gzopen() immediately followed by gzclose() would write an empty file instead of an empty gzip stream. > - Fix bug in gzclose() when gzwrite() runs out of memory > Version 1.2.7 has many portability improvements over 1.2.6, and has these enhancements: > - Fix bug in gzclose_w() when gzwrite() fails to allocate memory > - Add "x" (O_EXCL) and "e" (O_CLOEXEC) modes support to gzopen() > - Add gzopen_w() in Windows for wide character path names > - Fix type mismatch between get_crc_table() and crc_table > Version 1.2.6 has many changes over 1.2.5, including these improvements: > - gzread() can now read a file that is being written concurrently > - gzgetc() is now a macro for increased speed > - Added a 'T' option to gzopen() for transparent writing (no compression) > - Added deflatePending() to return the amount of pending output > - Allow deflateSetDictionary() and inflateSetDictionary() at any time in raw mode > - deflatePrime() can now insert bits in the middle of the stream > - ./configure now creates a configure.log file with all of the results > - Added a ./configure --solo option to compile zlib with no dependency on any libraries > - Fixed a problem with large file support macros > - Fixed a bug in contrib/puff > - Many portability improvements > > BUG=610615 > R=agl@chromium.org > R=gavinp@chromium.org > > Committed: https://crrev.com/a50849ae9ba1b2fad47905db521463b3bf085883 > Cr-Commit-Position: refs/heads/master@{#400647} TBR=agl@chromium.org,gavinp@chromium.org,khasim.mohammed@linaro.org,jiadong.zhu@linaro.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=610615 Review-Url: https://codereview.chromium.org/2079313002 Cr-Original-Commit-Position: refs/heads/master@{#400670} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 43770253ccc0425c4edde966e56b3e68955cc4d3
Diffstat (limited to 'infback.c')
-rw-r--r--infback.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/infback.c b/infback.c
index f3833c2..af3a8c9 100644
--- a/infback.c
+++ b/infback.c
@@ -1,5 +1,5 @@
/* infback.c -- inflate using a call-back interface
- * Copyright (C) 1995-2011 Mark Adler
+ * Copyright (C) 1995-2009 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -42,19 +42,10 @@ int stream_size;
return Z_STREAM_ERROR;
strm->msg = Z_NULL; /* in case we return an error */
if (strm->zalloc == (alloc_func)0) {
-#ifdef Z_SOLO
- return Z_STREAM_ERROR;
-#else
strm->zalloc = zcalloc;
strm->opaque = (voidpf)0;
-#endif
}
- if (strm->zfree == (free_func)0)
-#ifdef Z_SOLO
- return Z_STREAM_ERROR;
-#else
- strm->zfree = zcfree;
-#endif
+ if (strm->zfree == (free_func)0) strm->zfree = zcfree;
state = (struct inflate_state FAR *)ZALLOC(strm, 1,
sizeof(struct inflate_state));
if (state == Z_NULL) return Z_MEM_ERROR;
@@ -255,7 +246,7 @@ out_func out;
void FAR *out_desc;
{
struct inflate_state FAR *state;
- z_const unsigned char FAR *next; /* next input */
+ unsigned char FAR *next; /* next input */
unsigned char FAR *put; /* next output */
unsigned have, left; /* available input and output */
unsigned long hold; /* bit buffer */
@@ -403,6 +394,7 @@ void FAR *out_desc;
PULLBYTE();
}
if (here.val < 16) {
+ NEEDBITS(here.bits);
DROPBITS(here.bits);
state->lens[state->have++] = here.val;
}