summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2007-02-09 16:46:27 +0000
committerJoris Vink <joris@cvs.openbsd.org>2007-02-09 16:46:27 +0000
commitf2f23e7127d30f5bea8502e9b3e5601ac85f304f (patch)
tree471b2630e7e8c8bdbe84cf0a2b9851ef261d8b8a
parenta0ff8a8a95c14817b31d7c7bddfa5c4c02805c36 (diff)
correctly skip invalid entries when using
getdirentries(2). ok otto@
-rw-r--r--usr.bin/cvs/file.c4
-rw-r--r--usr.bin/cvs/update.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c
index ea0260804fb..f00c781bfdd 100644
--- a/usr.bin/cvs/file.c
+++ b/usr.bin/cvs/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.185 2007/02/09 03:49:15 joris Exp $ */
+/* $OpenBSD: file.c,v 1.186 2007/02/09 16:46:26 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
@@ -399,7 +399,7 @@ cvs_file_walkdir(struct cvs_file *cf, struct cvs_recursion *cr)
if (!strcmp(dp->d_name, ".") ||
!strcmp(dp->d_name, "..") ||
!strcmp(dp->d_name, CVS_PATH_CVSDIR) ||
- dp->d_reclen == 0) {
+ dp->d_fileno == 0) {
cp += dp->d_reclen;
continue;
}
diff --git a/usr.bin/cvs/update.c b/usr.bin/cvs/update.c
index 971fb033898..9783ff0bc55 100644
--- a/usr.bin/cvs/update.c
+++ b/usr.bin/cvs/update.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: update.c,v 1.94 2007/02/09 08:00:37 xsa Exp $ */
+/* $OpenBSD: update.c,v 1.95 2007/02/09 16:46:26 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
*
@@ -218,7 +218,7 @@ cvs_update_leavedir(struct cvs_file *cf)
dp = (struct dirent *)cp;
if (!strcmp(dp->d_name, ".") ||
!strcmp(dp->d_name, "..") ||
- dp->d_reclen == 0) {
+ dp->d_fileno == 0) {
cp += dp->d_reclen;
continue;
}