mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
occtl: avoid crash on empty cmdline argument
This commit is contained in:
@@ -121,7 +121,7 @@ unsigned need_help(const char *arg)
|
||||
unsigned check_cmd_help(const char *line)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned len = strlen(line);
|
||||
unsigned len = (line!=NULL)?strlen(line):0;
|
||||
unsigned status = 0, tlen;
|
||||
|
||||
while (len > 0 && (line[len - 1] == '?' || whitespace(line[len - 1])))
|
||||
|
||||
Reference in New Issue
Block a user