summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cifscreds.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cifscreds.c b/cifscreds.c
index 5d84c3c..32f2ee4 100644
--- a/cifscreds.c
+++ b/cifscreds.c
@@ -487,6 +487,9 @@ int main(int argc, char **argv)
}
}
+ if (optind >= argc)
+ return usage();
+
/* find the best fit command */
best = NULL;
n = strnlen(argv[optind], MAX_COMMAND_SIZE);