]> git.ipfire.org Git - thirdparty/coreutils.git/commit
Avoid the double-free (first in fts_read, second in fts_close) that
authorJim Meyering <jim@meyering.net>
Tue, 10 Jan 2006 11:55:13 +0000 (11:55 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 10 Jan 2006 11:55:13 +0000 (11:55 +0000)
commit58e925ce5fa24f2c37907a2bf1a39fd494ce86fd
treef8e6e728efc04e38eca2b6120f53e18ca427c7f1
parentf26f53be9c08d068fe4a71e13e507a973997ac82
Avoid the double-free (first in fts_read, second in fts_close) that
would occur when an `active' directory is made inaccessible (e.g.,
via chmod a-x) during a traversal.

(fts_read): After a failed fchdir, update sp->fts_cur
before returning.  Reproduce this failure by
mkdir -p a/b; cd a; chmod a-x . b
Reported by Stavros Passas.
lib/fts.c