summaryrefslogtreecommitdiffstats
path: root/compat/zlib/infback.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-02-03 23:33:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-02-03 23:33:16 (GMT)
commit9a5675d33fed114eab1c0c2db4d70ff4b85ea597 (patch)
treec6f8a5a12c00a3394a7a79fa2be6a4ecf065beed /compat/zlib/infback.c
parent1b8b1325832f5d25e6db0c5b7839dada981562f5 (diff)
downloadtcl-zlib_1_2_6.zip
tcl-zlib_1_2_6.tar.gz
tcl-zlib_1_2_6.tar.bz2
[Frq 3483854] zlib-1.2.6zlib_1_2_6
Not to be merged to trunk until the official zlib1.dll is released as well!!!
Diffstat (limited to 'compat/zlib/infback.c')
-rw-r--r--compat/zlib/infback.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/compat/zlib/infback.c b/compat/zlib/infback.c
index af3a8c9..981aff1 100644
--- a/compat/zlib/infback.c
+++ b/compat/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;
}