diff options
author | pixel <pixel> | 2005-06-06 11:16:15 +0000 |
---|---|---|
committer | pixel <pixel> | 2005-06-06 11:16:15 +0000 |
commit | 863e6a84a38d3d02211f704a8430e86add6514ed (patch) | |
tree | bdf51e5fd58336eddcfd9b7bbc478fa6ab7181e2 /lib/zlib/src/uncompr.c | |
parent | 2188dfc8e9c0406af3e7ab0152ea6eb837ad5c1c (diff) |
Updated zlib, adding hashing functions, and introducing first bits of a new sliding window generic algorithm.
Diffstat (limited to 'lib/zlib/src/uncompr.c')
-rw-r--r-- | lib/zlib/src/uncompr.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/zlib/src/uncompr.c b/lib/zlib/src/uncompr.c index 9baedde..e607d70 100644 --- a/lib/zlib/src/uncompr.c +++ b/lib/zlib/src/uncompr.c @@ -1,10 +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: uncompr.c,v 1.3 2004-11-27 21:46:13 pixel Exp $ */ +/* @(#) $Id: uncompr.c,v 1.4 2005-06-06 11:16:16 pixel Exp $ */ +#define ZLIB_INTERNAL #include "zlib.h" /* =========================================================================== @@ -49,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; |