diff --git a/bin/jslisten b/bin/jslisten index 26767e6..9de2872 100755 Binary files a/bin/jslisten and b/bin/jslisten differ diff --git a/src/jslisten.c b/src/jslisten.c index e5d80b7..13a1977 100644 --- a/src/jslisten.c +++ b/src/jslisten.c @@ -89,7 +89,11 @@ int buttonDefined(int val) { int getConfigFile() { int rc=1; // Default nothing found // Determine home dir - strcat(strcpy(iniFile, getenv("HOME")), myConfFile); + char *homeEnv = getenv("HOME"); + int strLength = strlen(homeEnv); + if (strLength > 0 ) { + strcat(strncpy(iniFile, homeEnv, strLength), myConfFile); + } // Look for personal file if( access( iniFile, R_OK ) != -1 ) {