From ca5b5b6d59287aaa0420a386e5e61546513d3819 Mon Sep 17 00:00:00 2001 From: Tobias Stoeckmann Date: Sun, 11 May 2008 12:16:01 +0000 Subject: 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 --- usr.bin/cvs/admin.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'usr.bin/cvs') 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 * Copyright (c) 2005 Joris Vink @@ -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); -- cgit v1.2.3