X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/28b9facceaea4d2d4cb66ed240300157be42bcdc..e938f7101179641c9478e9c914bc1bb3ee171570:/zlib/inflate.c diff --git a/zlib/inflate.c b/zlib/inflate.c index d2c666b0..df2f9d66 100644 --- a/zlib/inflate.c +++ b/zlib/inflate.c @@ -80,6 +80,15 @@ * The history for versions after 1.2.0 are in ChangeLog in zlib distribution. */ +//----------------------------------------------------------------------------- +// This version of zlib is modified for use within the Proxmark3 project. +// Files from the original distribution which are not required for this +// purpose are not included. All modifications can easily be found +// by searching for #ifdef ZLIB_PM3_TUNED and #ifndef ZLIB_PM3_TUNED. +//----------------------------------------------------------------------------- + + + #include "zutil.h" #include "inftrees.h" #include "inflate.h" @@ -847,8 +856,8 @@ int flush; break; case 1: /* fixed block */ #ifdef ZLIB_PM3_TUNED - Dbprintf("FATAL error. Compressed FPGA files with fixed code blocks are not supported!"); - for(;;); + strm->msg = (char *)"fixed block coding not supported"; + state->mode = BAD; #else fixedtables(state); Tracev((stderr, "inflate: fixed codes block%s\n", @@ -1514,7 +1523,7 @@ z_streamp strm; { struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16; + if (strm == Z_NULL || strm->state == Z_NULL) return ~0UL << 16; state = (struct inflate_state FAR *)strm->state; return ((long)(state->back) << 16) + (state->mode == COPY ? state->length :