From 9ff16d3668ecca4829de4fd71c56ebe2b02d316e Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Mon, 20 Nov 2023 11:24:08 +0100 Subject: irmd: Fix parsing names without args in configfile Config files that had service names without the args option specified would cause the IRMd to segfault. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/irmd/configfile.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/irmd/configfile.c b/src/irmd/configfile.c index 38a24433..42a8a152 100644 --- a/src/irmd/configfile.c +++ b/src/irmd/configfile.c @@ -564,6 +564,11 @@ static int args_to_argv(const char * args, char * str; int argc = 0; + if (args == NULL) { + *argv = NULL; + return 0; + } + str = (char *) args; tok = strtok(str, " "); -- cgit v1.2.3