Stop a null pointer dereference in the builtin hash function.
PR: 36141 Approved by: cracauer MFC after: 1 week
This commit is contained in:
parent
fc27278b9b
commit
4c7e4a544a
@ -350,7 +350,10 @@ hashcmd(int argc __unused, char **argv __unused)
|
||||
if (verbose) {
|
||||
if (entry.cmdtype != CMDUNKNOWN) { /* if no error msg */
|
||||
cmdp = cmdlookup(name, 0);
|
||||
printentry(cmdp, verbose);
|
||||
if (cmdp != NULL)
|
||||
printentry(cmdp, verbose);
|
||||
else
|
||||
outfmt(&errout, "%s: not found\n", name);
|
||||
}
|
||||
flushall();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user