tool_help: fix a NULL deref in the --help option code
Follow-up to 9a0cf56471
Pointed out by CodeSonar
Closes #14391
This commit is contained in:
parent
0238a9b0d7
commit
b9d465c89f
@ -264,7 +264,7 @@ void tool_help(char *category)
|
||||
noflagged = TRUE;
|
||||
}
|
||||
a = findlongopt(lookup);
|
||||
if(noflagged && (ARGTYPE(a->desc) != ARG_BOOL))
|
||||
if(a && noflagged && (ARGTYPE(a->desc) != ARG_BOOL))
|
||||
/* a --no- prefix for a non-boolean is not specifying a proper
|
||||
option */
|
||||
a = NULL;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user