diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2008-12-06 17:49:14 +0100 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2008-12-06 17:49:14 +0100 |
commit | 1ea3410ed20d2c9fc0ba0a5cfdc689dcda31ec9b (patch) | |
tree | 38df99b962de157c68786b99676805222dffc164 /eurephiadm | |
parent | f2260ce42c00585f8272001d4f704e4b709edbab (diff) | |
download | eurephia-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.c | 4 |
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) ) |