]> git.ipfire.org Git - thirdparty/coreutils.git/commit
(fts_read): When about to fail (by returning NULL) due
authorJim Meyering <jim@meyering.net>
Wed, 13 Oct 2004 19:25:30 +0000 (19:25 +0000)
committerJim Meyering <jim@meyering.net>
Wed, 13 Oct 2004 19:25:30 +0000 (19:25 +0000)
commit8be7fa2d6ac5ea7d5dbffc1a165c797b6e53586e
tree95d77389a2df2bddebff49bcd1a004ca2fc4cecb
parent292abe4bf00a18027082658a68315ae5581dfaea
(fts_read): When about to fail (by returning NULL) due
to a failed fchdir or failed fts_safe_changedir call, set
`sp->fts_cur = p'.  Do this by removing the explicit `return NULL;'
statements and setting p->fts_errno so execution falls through
to the common-case code below.  Otherwise, after such a failure,
calling fts_close would attempt to free an already-freed buffer.
Reported by Luis Lopez Lopez in http://bugs.debian.org/276352.
lib/fts.c