Skip to content

Commit 741ffc5

Browse files
ikegami-tigaw
authored andcommitted
util: fix argconfig_match_val() to check option value length
Currently get/set-feature feature-id "fdp" option value is not parsed. Handled as ambiguous by the multiple matches with the "fdp-events" option. Fixes: 1b3ba5d ("util: reduce complexity of argconfig_parse_val()") Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent 406f50a commit 741ffc5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

util/argconfig.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ argconfig_match_val(struct argconfig_opt_val *v, const char *str)
263263
if (strncasecmp(str, v->str, len))
264264
continue;
265265

266+
if (len == strlen(v->str))
267+
return v;
268+
266269
if (match)
267270
return NULL; /* multiple matches; input is ambiguous */
268271

0 commit comments

Comments
 (0)