bug in truncate(1) - all FreeBSD versions
Ighighi Ighighi
ighighi at gmail.com
Mon Aug 21 09:55:20 UTC 2006
The file in question is: /usr/src/usr.bin/truncate/truncate.c
I'm working on a portable version of truncate(1) and I noticed a lot of
"continue" statements in the main while() loop that skip the call to
close(fd) at the end. The obvious consequence is a file descriptor leak...
There's still another bug: parselength() does not need to return off_t
because its return value is checked in the usual binary (0 vs -1) way.
Salutes,
Igh
More information about the freebsd-bugs
mailing list