diff options
author | 2008-05-11 12:16:00 +0000 | |
---|---|---|
committer | 2008-05-11 12:16:00 +0000 | |
commit | 518886fbd83390444870ad84194dbe45e96216a1 (patch) | |
tree | edfe493c4463a6746d5d67fb19418de2cc985437 | |
parent | Memory leak in rcs_delta_stats plugged. (diff) | |
download | wireguard-openbsd-518886fbd83390444870ad84194dbe45e96216a1.tar.xz wireguard-openbsd-518886fbd83390444870ad84194dbe45e96216a1.zip |
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
-rw-r--r-- | gnu/usr.bin/cvs/src/admin.c | 5 | ||||
-rw-r--r-- | usr.bin/cvs/admin.c | 7 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gnu/usr.bin/cvs/src/admin.c b/gnu/usr.bin/cvs/src/admin.c index 359bedf1a65..effd18fe4fb 100644 --- a/gnu/usr.bin/cvs/src/admin.c +++ b/gnu/usr.bin/cvs/src/admin.c @@ -559,6 +559,11 @@ admin_fileproc (callerdat, finfo) } rcs = vers->srcfile; + if (rcs == NULL) + { + error (0, 0, "lost revision control file for `%s'", finfo->file); + goto exitfunc; + } if (rcs->flags & PARTIAL) RCS_reparsercsfile (rcs, (FILE **) NULL, (struct rcsbuffer *) NULL); 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); |