summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ctl-lib/ctl-config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ctl-lib/ctl-config.c b/ctl-lib/ctl-config.c
index de9f10e..f470255 100644
--- a/ctl-lib/ctl-config.c
+++ b/ctl-lib/ctl-config.c
@@ -48,7 +48,7 @@ json_object* CtlConfigScan(const char *dirList, const char *prefix) {
controlFile[CONTROL_MAXPATH_LEN - 1] = '\0';
- if(prefix[0] != '\0') {
+ if(prefix && prefix[0] != '\0') {
strncpy(controlFile, prefix, CONTROL_MAXPATH_LEN - 1);
strncat(controlFile, "-", CONTROL_MAXPATH_LEN - strlen(controlFile) - 1);
strncat(controlFile, binderName, CONTROL_MAXPATH_LEN - strlen(controlFile) - 1);