diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-11 18:45:43 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-10-11 18:45:43 +0000 |
commit | 87a2b23a2bafbd771625eb6ce8ee8e644aa8cfe3 (patch) | |
tree | 01e6e6bb5683a568f3e4d7be40728b9b503640c4 /zlib/uncompr.c | |
parent | 7462a1a322e01f1804376a6917413bf6ebf481a2 (diff) | |
download | gcc-87a2b23a2bafbd771625eb6ce8ee8e644aa8cfe3.tar.gz |
PR libgcj/14856:
* Imported zlib 1.2.1; merged local changes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88898 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'zlib/uncompr.c')
-rw-r--r-- | zlib/uncompr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/zlib/uncompr.c b/zlib/uncompr.c index a8037709720..8519d9bfaf8 100644 --- a/zlib/uncompr.c +++ b/zlib/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.1.1.2 2002/03/11 21:53:27 tromey 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; |