commit | ff1bf88562fbd7d5abb7145477cc11ab25e44d9a | [log] [tgz] |
---|---|---|
author | Benno Schulenberg <bensberg@justemail.net> | Fri Apr 15 12:27:48 2016 +0200 |
committer | Benno Schulenberg <bensberg@justemail.net> | Fri Apr 15 12:36:07 2016 +0200 |
tree | df2c878eb6a276f1e0c44eac76c3a7f3ebddcf49 | |
parent | 6414f9f000b68c4bee8a32d285fe5e4910afa44a [diff] |
files: limit the number of attempts at climbing up the directory tree Doing a chdir("..") will not fail when the root directory is reached, and when getcwd() keeps failing too, we have no way of knowing when to stop. So, simply limit the number of attempted chdirs, to avoid getting into an endless loop. This avoids the hang in https://savannah.gnu.org/bugs/index.php?47659. Reported-by: Chris Renshaw <osm0sis@outlook.com> Signed-off-by: Benno Schulenberg <bensberg@justemail.net>