summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-09-24 13:57:16 +0100
committerTom Hacohen <tom@stosb.com>2014-09-24 13:57:27 +0100
commitcf3a0c3ea17cb3c19aa4934746c71aa90e3217e1 (patch)
treea16546ba5be0d1f82bd56474fd916d9a5451086c
parent9c7147826f5922d0923863df0f5d489ad13839da (diff)
Add argument count check.
-rw-r--r--src/bin/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index d3134bc..87e95da 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -127,6 +127,12 @@ main(int argc, char *argv[])
127 } 127 }
128 } 128 }
129 129
130 if ((optind < 1) || (optind >= argc))
131 {
132 print_usage(argv[0]);
133 return 1;
134 }
135
130 elm_init(argc, argv); 136 elm_init(argc, argv);
131 137
132 gifter_cfg_init(PACKAGE_NAME); 138 gifter_cfg_init(PACKAGE_NAME);