X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/75bce3ad347a1ea870058391e624cccc159737d3..62ad3cb358891240142cbf33259758bbe79be53f:/src/zlib/deflate.c diff --git a/src/zlib/deflate.c b/src/zlib/deflate.c index ab3e7dfec5..8cee4007ac 100644 --- a/src/zlib/deflate.c +++ b/src/zlib/deflate.c @@ -1,5 +1,5 @@ /* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-1998 Jean-loup Gailly. + * Copyright (C) 1995-2002 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.1.2 Copyright 1995-1998 Jean-loup Gailly "; + " deflate 1.1.4 Copyright 1995-2002 Jean-loup Gailly "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -251,7 +251,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, windowBits = -windowBits; } if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || - windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || + windowBits < 9 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_HUFFMAN_ONLY) { return Z_STREAM_ERROR; } @@ -649,11 +649,13 @@ int ZEXPORT deflateCopy (dest, source) deflate_state *ss; ushf *overlay; - ss = source->state; - if (source == Z_NULL || dest == Z_NULL || ss == Z_NULL) { + if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) { return Z_STREAM_ERROR; } + + ss = source->state; + *dest = *source; ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));