diff options
author | 2004-08-31 11:54:35 +0000 | |
---|---|---|
committer | 2004-08-31 11:54:35 +0000 | |
commit | 9c4cd84f5a2c855bbf365475139384937c38aefe (patch) | |
tree | 309a49339ef49bf50d907f2a64e771045a569ad6 | |
parent | check return value of strdup(3); (diff) | |
download | wireguard-openbsd-9c4cd84f5a2c855bbf365475139384937c38aefe.tar.xz wireguard-openbsd-9c4cd84f5a2c855bbf365475139384937c38aefe.zip |
Do not crash when there is no user specified in the CVSROOT. Simplified
version of a diff by Joris Vink.
-rw-r--r-- | usr.bin/cvs/root.c | 4 |
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) { |