diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2004-12-03 03:06:38 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2004-12-03 03:06:38 +0000 |
commit | d96931260dc21ceb4f8d4e37df6f2bc6a29f98d4 (patch) | |
tree | 782175db670b464e3ad734215dacc64ae755662b /lib/libz/gzio.c | |
parent | d48077462d88e247b3bd612bd0da8c6299a10fa2 (diff) |
update to zlib-1.21 (we already have the CAN-2004-0797 security fixes)
"in it goes" deraadt@, in the near-total absence of feedback from others
Diffstat (limited to 'lib/libz/gzio.c')
-rw-r--r-- | lib/libz/gzio.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libz/gzio.c b/lib/libz/gzio.c index 632c76617b0..36b554cc16f 100644 --- a/lib/libz/gzio.c +++ b/lib/libz/gzio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gzio.c,v 1.12 2003/12/16 22:33:02 henning Exp $ */ +/* $OpenBSD: gzio.c,v 1.13 2004/12/03 03:06:36 djm Exp $ */ /* gzio.c -- IO on .gz files * Copyright (C) 1995-2003 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h @@ -457,6 +457,10 @@ int ZEXPORT gzread (file, buf, len) s->z_err = Z_ERRNO; break; } + if (feof(s->file)) { /* avoid error for empty file */ + s->z_err = Z_STREAM_END; + break; + } } s->stream.next_in = s->inbuf; } |