summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2017-03-08 14:43:40 +0000
committernicm <nicm>2017-03-08 14:43:40 +0000
commit41b31fe2401465916e186ea6e111ed394fcc6c86 (patch)
tree594bf52d6968397c73aa09a89883fb5864efce78
parent78ca1b02656808908e2c5dc19909966c3d3bb555 (diff)
Handle empty options correctly.
-rw-r--r--options.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/options.c b/options.c
index 4de25937..4cd3ea10 100644
--- a/options.c
+++ b/options.c
@@ -427,6 +427,8 @@ options_match(const char *s, int *idx, int* ambiguous)
size_t namelen;
name = options_parse(s, idx);
+ if (name == NULL)
+ return (NULL);
namelen = strlen(name);
if (*name == '@') {