summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorJoris Vink <joris@cvs.openbsd.org>2008-02-27 18:25:39 +0000
committerJoris Vink <joris@cvs.openbsd.org>2008-02-27 18:25:39 +0000
commit9f9ee990a7626916cdf3dc651ff4d7a53b8ab6f0 (patch)
tree46c6a813456fcb2660306f2973dcfa78a12c3440 /gnu/usr.bin
parentb8441ef08365d11d33c7829aebc41d18df6cbfc7 (diff)
fix a segfault in gnucvs that can occur with "checkout -c" if there is
an unknown flag specified in CVSROOT/modules. found by tobias@, ok millert@
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/cvs/src/modules.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/usr.bin/cvs/src/modules.c b/gnu/usr.bin/cvs/src/modules.c
index c588b71cd04..2e63f70d22b 100644
--- a/gnu/usr.bin/cvs/src/modules.c
+++ b/gnu/usr.bin/cvs/src/modules.c
@@ -1003,6 +1003,11 @@ cat_module (status)
wid = 0;
while ((c = getopt (argc, argv, CVSMODULE_OPTS)) != -1)
{
+ if (c == '?') {
+ error (0, 0, "invalid module line");
+ return;
+ }
+
if (!status)
{
if (c == 'a' || c == 'l')