diff options
author | tjr <tjr@FreeBSD.org> | 2004-06-30 23:54:46 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2004-06-30 23:54:46 +0000 |
commit | 23687471664c322d3854e587a32af938a5b1c185 (patch) | |
tree | de1d43b9c6f17b0eac60ab29d51d8339ed949c0b /lib/libz/uncompr.c | |
parent | 6ea5314b57928a6385cf31fb23a37d5b50104805 (diff) | |
download | FreeBSD-src-23687471664c322d3854e587a32af938a5b1c185.zip FreeBSD-src-23687471664c322d3854e587a32af938a5b1c185.tar.gz |
Resolve conflicts.
Diffstat (limited to 'lib/libz/uncompr.c')
-rw-r--r-- | lib/libz/uncompr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libz/uncompr.c b/lib/libz/uncompr.c index 0370ac9..a428b5a 100644 --- a/lib/libz/uncompr.c +++ b/lib/libz/uncompr.c @@ -1,11 +1,12 @@ /* 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 */ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#define ZLIB_INTERNAL #include "zlib.h" /* =========================================================================== @@ -50,7 +51,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; |