From a99b6473b290b3f5071b40736b350e932234c570 Mon Sep 17 00:00:00 2001 From: Jean-Francois Brousseau Date: Tue, 28 Dec 2004 21:58:43 +0000 Subject: abort with an error if we can't figure out what the connection method is --- usr.bin/cvs/root.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'usr.bin/cvs') diff --git a/usr.bin/cvs/root.c b/usr.bin/cvs/root.c index 255663448dd..fcc2594e686 100644 --- a/usr.bin/cvs/root.c +++ b/usr.bin/cvs/root.c @@ -1,4 +1,4 @@ -/* $OpenBSD: root.c,v 1.13 2004/12/07 17:10:56 tedu Exp $ */ +/* $OpenBSD: root.c,v 1.14 2004/12/28 21:58:42 jfb Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -141,6 +141,11 @@ cvsroot_parse(const char *str) break; } } + if (i == CVS_NBMETHODS) { + cvs_log(LP_ERR, "unknown method `%s'", sp); + cvsroot_free(root); + return (NULL); + } } /* find the start of the actual path */ -- cgit v1.2.3