diff options
author | peter <peter@FreeBSD.org> | 1997-09-22 12:48:40 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1997-09-22 12:48:40 +0000 |
commit | 21be387d72781034269871fc394f0b771eb7abb6 (patch) | |
tree | a3a83745148d34647106faf123c8b454e27613d7 /lib | |
parent | 3d54ce0c25080254a79db1cf299a625e44e5bdc4 (diff) | |
download | FreeBSD-src-21be387d72781034269871fc394f0b771eb7abb6.zip FreeBSD-src-21be387d72781034269871fc394f0b771eb7abb6.tar.gz |
Apply fts() fix from PR#4593
Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/fts-compat.c | 2 | ||||
-rw-r--r-- | lib/libc/gen/fts.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/fts-compat.c b/lib/libc/gen/fts-compat.c index 938dcb5..73832e5 100644 --- a/lib/libc/gen/fts-compat.c +++ b/lib/libc/gen/fts-compat.c @@ -747,7 +747,7 @@ mem1: saved_errno = errno; * state. */ if (ISSET(FTS_NOCHDIR)) { - if (cp - 1 > sp->fts_path) + if (len == sp->fts_pathlen) --cp; *cp = '\0'; } diff --git a/lib/libc/gen/fts.c b/lib/libc/gen/fts.c index 938dcb5..73832e5 100644 --- a/lib/libc/gen/fts.c +++ b/lib/libc/gen/fts.c @@ -747,7 +747,7 @@ mem1: saved_errno = errno; * state. */ if (ISSET(FTS_NOCHDIR)) { - if (cp - 1 > sp->fts_path) + if (len == sp->fts_pathlen) --cp; *cp = '\0'; } |