X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=thirdparty%2Fzlib%2Finfback.c;h=981aff17c2d4ab0f157e503219e4ca9bd68eaf3a;hb=05fa80124e0546b6d7cc4701ffe37efc3ced5521;hp=af3a8c965d50cc6ac05c6c844a8f79e2cdc9f3c1;hpb=686714aa50236aece6165a342ab7de723a8859af;p=apitrace diff --git a/thirdparty/zlib/infback.c b/thirdparty/zlib/infback.c index af3a8c9..981aff1 100644 --- a/thirdparty/zlib/infback.c +++ b/thirdparty/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; }