diff options
author | delphij <delphij@FreeBSD.org> | 2012-06-21 21:47:08 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2012-06-21 21:47:08 +0000 |
commit | f1aa6057552263943bc055b803d1254994d5f139 (patch) | |
tree | 77406785fe7cd37081c5a9cabb2dc128be5b4716 /lib/libz/infback.c | |
parent | 47822f6690f1e74d6e808a2d97e6ed1ce4ad5089 (diff) | |
parent | 5ecec51ae55e160069af12ac1c8fb3c4612e498d (diff) | |
download | FreeBSD-src-f1aa6057552263943bc055b803d1254994d5f139.zip FreeBSD-src-f1aa6057552263943bc055b803d1254994d5f139.tar.gz |
MFV: Update zlib to 1.2.7.
(x86 assembler optimization disabled for now because it
requires the new .cfi_* directives that is not supported
by base system binutils).
MFC after: 1 week
Diffstat (limited to 'lib/libz/infback.c')
-rw-r--r-- | lib/libz/infback.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/libz/infback.c b/lib/libz/infback.c index af3a8c9..981aff1 100644 --- a/lib/libz/infback.c +++ b/lib/libz/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; } |