summaryrefslogtreecommitdiff
path: root/usr.bin/cvs
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2008-05-11 12:16:01 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2008-05-11 12:16:01 +0000
commitca5b5b6d59287aaa0420a386e5e61546513d3819 (patch)
tree2fb93ef90e9d62f9612a34a25e0a993d3189a781 /usr.bin/cvs
parentd30da1653b2797307b8254741949acc007615a04 (diff)
If "cvs admin" encountered an entry in CVS/Entries for a file which has no
(longer an) RCS file in CVSROOT, both -- GNU cvs and OpenCVS -- segfaulted. ok joris
Diffstat (limited to 'usr.bin/cvs')
-rw-r--r--usr.bin/cvs/admin.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/cvs/admin.c b/usr.bin/cvs/admin.c
index 452af8f1615..c5796ca5b33 100644
--- a/usr.bin/cvs/admin.c
+++ b/usr.bin/cvs/admin.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: admin.c,v 1.57 2008/03/09 03:14:52 joris Exp $ */
+/* $OpenBSD: admin.c,v 1.58 2008/05/11 12:16:00 tobias Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* Copyright (c) 2005 Joris Vink <joris@openbsd.org>
@@ -222,6 +222,11 @@ cvs_admin_local(struct cvs_file *cf)
return;
}
+ if (cf->file_rcs == NULL) {
+ cvs_log(LP_ERR, "lost RCS file for `%s'", cf->file_path);
+ return;
+ }
+
if (verbosity > 0)
cvs_printf("RCS file: %s\n", cf->file_rcs->rf_path);