summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-08-31 11:54:36 +0000
committerJean-Francois Brousseau <jfb@cvs.openbsd.org>2004-08-31 11:54:36 +0000
commite86fc9f05c03fed90ac641d2d63242d7db9a1b4e (patch)
tree0e5680b1f24e2cd28ebe1065ad48ab11d3807f31 /usr.bin
parentf1939467b4d7de57e492f81dc1c6e554ed8aa2ce (diff)
Do not crash when there is no user specified in the CVSROOT. Simplified
version of a diff by Joris Vink.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cvs/root.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/cvs/root.c b/usr.bin/cvs/root.c
index 9b08c30d5c5..b8c68b45b67 100644
--- a/usr.bin/cvs/root.c
+++ b/usr.bin/cvs/root.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: root.c,v 1.10 2004/08/27 15:40:44 jfb Exp $ */
+/* $OpenBSD: root.c,v 1.11 2004/08/31 11:54:35 jfb Exp $ */
/*
* Copyright (c) 2004 Jean-Francois Brousseau <jfb@openbsd.org>
* All rights reserved.
@@ -184,6 +184,8 @@ cvsroot_parse(const char *str)
root->cr_user = cp;
}
+ else
+ sp = cp;
pp = strchr(sp, ':');
if (pp != NULL) {