diff options
author | 2005-06-17 14:58:23 +0000 | |
---|---|---|
committer | 2005-06-17 14:58:23 +0000 | |
commit | bc1cf003a4bd254c6f8c084d91acbbc5be9d35b7 (patch) | |
tree | abe68394abd8d2c7aae3902217170b70d3fef039 /usr.bin/cvs/file.c | |
parent | remove non-constant array initializers which is a GNU extension. (diff) | |
download | wireguard-openbsd-bc1cf003a4bd254c6f8c084d91acbbc5be9d35b7.tar.xz wireguard-openbsd-bc1cf003a4bd254c6f8c084d91acbbc5be9d35b7.zip |
when pruning don't try to remove any directories outside
the actual repository.
reported by david@, ok xsa@
Diffstat (limited to 'usr.bin/cvs/file.c')
-rw-r--r-- | usr.bin/cvs/file.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/cvs/file.c b/usr.bin/cvs/file.c index d12d6eddef0..0b02b972e56 100644 --- a/usr.bin/cvs/file.c +++ b/usr.bin/cvs/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.88 2005/06/14 15:27:31 joris Exp $ */ +/* $OpenBSD: file.c,v 1.89 2005/06/17 14:58:23 joris Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org> * All rights reserved. @@ -1165,6 +1165,7 @@ cvs_file_prune(char *path) struct dirent *dp; char fpath[MAXPATHLEN]; CVSENTRIES *entf; + CVSFILE *cfp; pwd = (!strcmp(path, ".")); @@ -1192,6 +1193,10 @@ cvs_file_prune(char *path) continue; } + cfp = cvs_file_find(cvs_files, fpath); + if (cfp == NULL) + continue; + if (cvs_file_prune(fpath)) { empty--; if (entf) |