Subject: bin/29484: inappropriate error checks in gzip
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <yamt@mwd.biglobe.ne.jp>
List: netbsd-bugs
Date: 02/21/2005 21:40:00
>Number: 29484
>Category: bin
>Synopsis: inappropriate error check in gzip
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Feb 21 21:40:00 +0000 2005
>Originator: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release: NetBSD 2.99.14
>Organization:
>Environment:
System: NetBSD kaeru 2.99.14 NetBSD 2.99.14 (build.kaeru) #204: Mon Feb 21 20:51:15 JST 2005 takashi@kaeru:/usr/home/takashi/work/kernel/build.kaeru i386
Architecture: i386
Machine: i386
>Description:
in-tree gzip has some code like the following,
which don't work as expected on short-read.
if (read(STDIN_FILENO, header1, sizeof header1) != sizeof header1) {
maybe_warn("can't read stdin");
return;
}
>How-To-Repeat:
run regress/usr.bin/gzip/pipe.
>Fix:
>Unformatted: