From 42396e05cf0aacac9c2da9981685df09ec8cd77b Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 22 Sep 1997 12:48:40 +0000 Subject: [PATCH] Apply fts() fix from PR#4593 Submitted by: Dmitrij Tejblum --- lib/libc/gen/fts-compat.c | 2 +- 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 938dcb58c82a..73832e59ff18 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 938dcb58c82a..73832e59ff18 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'; }