Fix crash on empty state response

OpenVPN3 doesn't yet support "state"
management command without parameters.

While this has to be fixed on OpenVPN3
side, it doesn't mean that gui could simply crash.

Signed-off-by: Lev Stipakov <lev@openvpn.net>
pull/529/head
Lev Stipakov 2022-09-02 14:48:01 +03:00 committed by Selva Nair
parent 732875d8ff
commit 9294485657
1 changed files with 3 additions and 0 deletions

View File

@ -286,6 +286,9 @@ OnStateChange(connection_t *c, char *data)
{
char *pos, *state, *message;
if (data == NULL)
return;
pos = strchr(data, ',');
if (pos == NULL)
return;