summaryrefslogtreecommitdiffstats
path: root/eurephiadm
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-12-06 17:49:14 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-12-06 17:49:14 +0100
commit1ea3410ed20d2c9fc0ba0a5cfdc689dcda31ec9b (patch)
tree38df99b962de157c68786b99676805222dffc164 /eurephiadm
parentf2260ce42c00585f8272001d4f704e4b709edbab (diff)
downloadeurephia-1ea3410ed20d2c9fc0ba0a5cfdc689dcda31ec9b.tar.gz
eurephia-1ea3410ed20d2c9fc0ba0a5cfdc689dcda31ec9b.tar.xz
eurephia-1ea3410ed20d2c9fc0ba0a5cfdc689dcda31ec9b.zip
BUGFIX: Do not try to parse arguments which are NULL
Diffstat (limited to 'eurephiadm')
-rw-r--r--eurephiadm/argparser.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/eurephiadm/argparser.c b/eurephiadm/argparser.c
index 8860103..bc635e8 100644
--- a/eurephiadm/argparser.c
+++ b/eurephiadm/argparser.c
@@ -31,6 +31,10 @@ int _eurephia_getopt(const char *module, int curarg, int argc, char **argv, e_op
int i = 0;
char *arg = argv[curarg];
+ if( arg == NULL ) {
+ return -1;
+ }
+
for( i = 0; argopts[i].longarg != NULL; i++ ) {
if( (strcmp(argopts[i].longarg, arg) == 0)
|| (strcmp(argopts[i].shortarg, arg) == 0) )