diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-16 22:33:03 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2003-12-16 22:33:03 +0000 |
commit | 2ae40db11c273adaddcc3023abc89a1f58a5e1f2 (patch) | |
tree | 3f6cf6f894f8be314da800362fd2f0013e2a865a /lib/libz/uncompr.c | |
parent | ba9fdd12549af4456c83102dcd337df247574615 (diff) |
update to zlib 1.2.1
ok millert@ deraadt@
Diffstat (limited to 'lib/libz/uncompr.c')
-rw-r--r-- | lib/libz/uncompr.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libz/uncompr.c b/lib/libz/uncompr.c index a4b52735408..2b50fa3602f 100644 --- a/lib/libz/uncompr.c +++ b/lib/libz/uncompr.c @@ -1,10 +1,11 @@ -/* $OpenBSD: uncompr.c,v 1.4 2002/03/12 00:25:57 millert Exp $ */ +/* $OpenBSD: uncompr.c,v 1.5 2003/12/16 22:33:02 henning Exp $ */ /* 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 */ +#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; |