summaryrefslogtreecommitdiffstats
path: root/Utilities/cmzlib/uncompr.c
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmzlib/uncompr.c')
-rw-r--r--Utilities/cmzlib/uncompr.c12
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;