summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2006-07-07 13:01:41 +0000
committerJoris Vink <joris@cvs.openbsd.org>2006-07-07 13:01:41 +0000
commit9cda61c3e7f45f83e12c307486f4f47e227b5e4f (patch)
tree600ff393344119a8aa55f62f794da8ee4477427d
parent5cbb61bf071edae01c3568857ce4d756aae5ba1e (diff)
fix segfault for newly added files.
found while test driving the new remote code.
-rw-r--r--usr.bin/cvs/status.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cvs/status.c b/usr.bin/cvs/status.c
index 068d43f4f74..d1f3f8cc8d8 100644
--- a/usr.bin/cvs/status.c
+++ b/usr.bin/cvs/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.66 2006/06/19 05:05:17 joris Exp $ */
+/* $OpenBSD: status.c,v 1.67 2006/07/07 13:01:40 joris Exp $ */
/*
* Copyright (c) 2006 Joris Vink <joris@openbsd.org>
* Copyright (c) 2005, 2006 Xavier Santolaria <xsa@openbsd.org>
@@ -122,7 +122,7 @@ cvs_status_local(struct cvs_file *cf)
if (cf->file_status == FILE_LOST ||
cf->file_status == FILE_UNKNOWN ||
- cf->file_rcs->rf_inattic == 1) {
+ (cf->file_rcs != NULL && cf->file_rcs->rf_inattic == 1)) {
l = snprintf(buf, sizeof(buf), "no file %s\t", cf->file_name);
if (l == -1 || l >= (int)sizeof(buf))
fatal("cvs_status_local: overflow");