diff options
author | Christian Heimes <christian@cheimes.de> | 2013-10-21 10:03:09 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-10-21 10:03:09 (GMT) |
commit | c20bcde58dc2ed770900ab553ac663f2f1212fc2 (patch) | |
tree | 05eb7cad3054f3c5b8e557d40ef97bce5a416026 /Modules/zlib/infback.c | |
parent | 3ac1eb16d5c4b779da38895597ee5d7caf3d22bd (diff) | |
download | cpython-c20bcde58dc2ed770900ab553ac663f2f1212fc2.zip cpython-c20bcde58dc2ed770900ab553ac663f2f1212fc2.tar.gz cpython-c20bcde58dc2ed770900ab553ac663f2f1212fc2.tar.bz2 |
Issue #18527: Upgrade internal copy of zlib to 1.2.8
Diffstat (limited to 'Modules/zlib/infback.c')
-rw-r--r-- | Modules/zlib/infback.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Modules/zlib/infback.c b/Modules/zlib/infback.c index af3a8c9..f3833c2 100644 --- a/Modules/zlib/infback.c +++ b/Modules/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; @@ -246,7 +255,7 @@ out_func out; void FAR *out_desc; { struct inflate_state FAR *state; - unsigned char FAR *next; /* next input */ + z_const unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ unsigned have, left; /* available input and output */ unsigned long hold; /* bit buffer */ @@ -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; } |