diff options
author | David Cole <david.cole@kitware.com> | 2007-09-11 15:22:29 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2007-09-11 15:22:29 (GMT) |
commit | 3edcd70754afe7c6b2ff71e0010c6b3d64b4fe37 (patch) | |
tree | 0dca962765d94496432c628b96dbfeef7a252064 /Utilities/cmzlib/uncompr.c | |
parent | f262298bb037b683c995f239d1ca9fc00aaec3f3 (diff) | |
download | CMake-3edcd70754afe7c6b2ff71e0010c6b3d64b4fe37.zip CMake-3edcd70754afe7c6b2ff71e0010c6b3d64b4fe37.tar.gz CMake-3edcd70754afe7c6b2ff71e0010c6b3d64b4fe37.tar.bz2 |
ENH: Update zlib to 1.2.3. Addresses bugs #5445 and #3473.
Diffstat (limited to 'Utilities/cmzlib/uncompr.c')
-rw-r--r-- | Utilities/cmzlib/uncompr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Utilities/cmzlib/uncompr.c b/Utilities/cmzlib/uncompr.c index 08f8046..b59e3d0 100644 --- a/Utilities/cmzlib/uncompr.c +++ b/Utilities/cmzlib/uncompr.c @@ -1,13 +1,11 @@ /* uncompr.c -- decompress a memory buffer - * Copyright (C) 1995-2002 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h + * Copyright (C) 1995-2003 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ -#if defined(_MSC_VER) -#pragma warning ( disable : 4702 ) -#endif +#define ZLIB_INTERNAL #include "zlib.h" /* =========================================================================== @@ -52,7 +50,9 @@ int ZEXPORT uncompress (dest, destLen, source, sourceLen) err = inflate(&stream, Z_FINISH); if (err != Z_STREAM_END) { inflateEnd(&stream); - return err == Z_OK ? Z_BUF_ERROR : err; + if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0)) + return Z_DATA_ERROR; + return err; } *destLen = stream.total_out; |