Skip to content
Snippets Groups Projects
Unverified Commit 20eea9b9 authored by Matthias Schiffer's avatar Matthias Schiffer Committed by GitHub
Browse files

gluon-mesh-vpn-fastd: fix respondd segfault under load (#2594)

When running "fastd -v" fails, line may be NULL, causing a segfault in
strncmp.
parent fa123e56
No related branches found
No related tags found
No related merge requests found
...@@ -65,7 +65,7 @@ static struct json_object * get_fastd_version(void) { ...@@ -65,7 +65,7 @@ static struct json_object * get_fastd_version(void) {
} }
const char *version = line; const char *version = line;
if (strncmp(version, "fastd ", 6) == 0) if (version && strncmp(version, "fastd ", 6) == 0)
version += 6; version += 6;
struct json_object *ret = gluonutil_wrap_string(version); struct json_object *ret = gluonutil_wrap_string(version);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment