Commit dc7a78b4 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Fix segfault in argument parsing

Using arguments that need a parameter without providing one would lead a segfault due to calling strcmp() will NULL. Triggered by running "nxagent -ac :1 -options nx/nx,fullscreen" or similar, Fixes ArcticaProject/nx-libs#847
parent 5405447e
...@@ -1103,6 +1103,9 @@ static void nxagentParseSingleOption(char *name, char *value) ...@@ -1103,6 +1103,9 @@ static void nxagentParseSingleOption(char *name, char *value)
URLDecodeInPlace(value); URLDecodeInPlace(value);
if (!value)
value = "";
if (!strcmp(name, "kbtype") || if (!strcmp(name, "kbtype") ||
!strcmp(name, "keyboard") || !strcmp(name, "keyboard") ||
!strcmp(name, "id") || !strcmp(name, "id") ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment