summaryrefslogtreecommitdiff
path: root/src/irmd/configfile.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2023-11-20 11:24:08 +0100
committerSander Vrijders <sander@ouroboros.rocks>2023-11-20 13:20:06 +0100
commit9ff16d3668ecca4829de4fd71c56ebe2b02d316e (patch)
tree7ee2766d5cef4dae774105a4e6a2d17a90420d8c /src/irmd/configfile.c
parenta37d4f406a4c6d39dbd6ff137dcd5a8047397d73 (diff)
downloadouroboros-9ff16d3668ecca4829de4fd71c56ebe2b02d316e.tar.gz
ouroboros-9ff16d3668ecca4829de4fd71c56ebe2b02d316e.zip
irmd: Fix parsing names without args in configfile0.20.2
Config files that had service names without the args option specified would cause the IRMd to segfault. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/irmd/configfile.c')
-rw-r--r--src/irmd/configfile.c5
1 files changed, 5 insertions, 0 deletions
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, " ");