Bug 278378 - man(1) ignores corrupt gzip'd manual pages
Summary: man(1) ignores corrupt gzip'd manual pages
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 15.0-CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Wolfram Schneider
URL:
Keywords:
Depends on: 223516
Blocks:
  Show dependency treegraph
 
Reported: 2024-04-15 12:59 UTC by Wolfram Schneider
Modified: 2024-04-20 08:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram Schneider freebsd_committer freebsd_triage 2024-04-15 12:59:11 UTC
man(1) ignores errors from gzip if a file is corrupt. You can see the errors from gzip on stderr, but the exit status of man(1) will be zero.

How to repeat:

$ touch /tmp/bla.1.gz

$ /usr/bin/man /tmp/bla.1.gz >/dev/null; echo $?
gzcat: /tmp/bla.1.gz: unexpected end of file
gzcat: /tmp/bla.1.gz: unexpected end of file
gzcat: /tmp/bla.1.gz: unexpected end of file
0

In case of an error, man(1) should exit with a non-zero status.
Comment 1 Wolfram Schneider freebsd_committer freebsd_triage 2024-04-20 08:34:51 UTC
Fixed by 14a5c1068d3751173dc41f3097b12e95791b2160