summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-10-18 13:28:54 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-10-18 13:28:54 -0400
commit39f384bba191218ec35240fbf73247bc27eb10d6 (patch)
tree39e76d3266530c2a7c1415eef3b89c652fd93ef0
parent511ee4e6f427302d461b212a7c68b3eed179b0cc (diff)
ecore/getopt: handle negative return in arg parsing
Summary: _ecore_getopt_parse_find_nonargs_base() can return -1 on errors CID 1402615 Reviewers: devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10393
-rw-r--r--src/lib/ecore/ecore_getopt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/ecore/ecore_getopt.c b/src/lib/ecore/ecore_getopt.c
index c85a71a..f81df25 100644
--- a/src/lib/ecore/ecore_getopt.c
+++ b/src/lib/ecore/ecore_getopt.c
@@ -2135,6 +2135,7 @@ ecore_getopt_parse_positional(const Ecore_Getopt *parser,
2135 start = argc; 2135 start = argc;
2136 else if (start < 1) 2136 else if (start < 1)
2137 start = _ecore_getopt_parse_find_nonargs_base(parser, argc, argv); 2137 start = _ecore_getopt_parse_find_nonargs_base(parser, argc, argv);
2138 if (start < 0) goto error;
2138 2139
2139 nonargs = start; 2140 nonargs = start;
2140 for (desc = parser->descs; !_ecore_getopt_desc_is_sentinel(desc); desc++); 2141 for (desc = parser->descs; !_ecore_getopt_desc_is_sentinel(desc); desc++);