Skip to content

Commit 43b7d0a

Browse files
committed
Ensure an option has a name before comparing it
1 parent b787d8e commit 43b7d0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adopt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ INLINE(const adopt_spec *) spec_for_long(
7171

7272
/* Handle --option=value arguments */
7373
if (spec->type == ADOPT_TYPE_VALUE &&
74-
eql &&
74+
spec->name && eql &&
7575
strncmp(arg, spec->name, eql_pos) == 0 &&
7676
spec->name[eql_pos] == '\0') {
7777
*has_value = 1;

0 commit comments

Comments
 (0)