reassign 537434 man-db
retitle 537434 "man zshall" does not always show all the man pages (bug in
decompress_open)
thanks
I've done some analysis with strace. The problem is that in zsoelim.c,
man sometimes tries to open man1/zshxxx.1 instead of the .gz version.
The reason is a bug in decompress_open() from lib/decompress.c (the
function sometimes returns a non-null pointer value, though stat()
failed). The code contains:
if (stat (filename, &st) < 0 && !S_ISDIR (st.st_mode))
return NULL;
But if stat() fails, st may not have been filled in, so that the
test !S_ISDIR (st.st_mode) makes no sense. Shouldn't this be:
if (stat (filename, &st) < 0 || S_ISDIR (st.st_mode))
return NULL;
i.e. if the file doesn't exist or is a directory, one returns a
null pointer?
--
Vincent Lefèvre <[email protected]> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]