aboutsummaryrefslogtreecommitdiff
path: root/zlib/infback.c
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2012-11-16 18:35:05 +0000
committerMatthias Klose <doko@ubuntu.com>2012-11-16 18:35:05 +0000
commitca7c771cf2bda3b59055acd1af8665d88c876a19 (patch)
tree134aeb9aadb88e8719595edaaa40522b99d2a56a /zlib/infback.c
parent8e3e4f69d0618629b64694d39e09890b3acaf261 (diff)
2012-11-16 Matthias Klose <doko@ubuntu.com>
* Imported zlib 1.2.7; merged local changes. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@193574 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'zlib/infback.c')
-rw-r--r--zlib/infback.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/zlib/infback.c b/zlib/infback.c
index af3a8c965d5..981aff17c2d 100644
--- a/zlib/infback.c
+++ b/zlib/infback.c
@@ -1,5 +1,5 @@
/* infback.c -- inflate using a call-back interface
- * Copyright (C) 1995-2009 Mark Adler
+ * Copyright (C) 1995-2011 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -42,10 +42,19 @@ 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) strm->zfree = zcfree;
+ if (strm->zfree == (free_func)0)
+#ifdef Z_SOLO
+ return Z_STREAM_ERROR;
+#else
+ strm->zfree = zcfree;
+#endif
state = (struct inflate_state FAR *)ZALLOC(strm, 1,
sizeof(struct inflate_state));
if (state == Z_NULL) return Z_MEM_ERROR;
@@ -394,7 +403,6 @@ void FAR *out_desc;
PULLBYTE();
}
if (here.val < 16) {
- NEEDBITS(here.bits);
DROPBITS(here.bits);
state->lens[state->have++] = here.val;
}