From 8a3e864c332f834f0f23c7f7f5b8e605cffe4bf5 Mon Sep 17 00:00:00 2001 From: Lev Stipakov Date: Fri, 2 Sep 2022 14:48:01 +0300 Subject: [PATCH] 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 --- openvpn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openvpn.c b/openvpn.c index 322c6b6..772eded 100644 --- a/openvpn.c +++ b/openvpn.c @@ -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;