mirror of
https://github.com/tomasriveral/NoteWrapper.git
synced 2026-08-11 18:18:36 +02:00
Fix: prevent cases where // in paths could broke stat()
This commit is contained in:
+1
-1
@@ -120,7 +120,7 @@ arg_next:
|
||||
tempUnFixedName++; // shifts and removes the ~
|
||||
directoriesArray[i] = malloc(PATH_MAX);
|
||||
debug("~ in %s was expanded to %s", tempUnFixedName, homedir);
|
||||
snprintf(directoriesArray[i], PATH_MAX, "%s/%s", homedir, tempUnFixedName);
|
||||
snprintf(directoriesArray[i], PATH_MAX, "%s%s", homedir, tempUnFixedName);
|
||||
} else {
|
||||
directoriesArray[i] = strdup(cJSON_GetStringValue(tempEntry));
|
||||
altDebug("%s\n",directoriesArray[i]);
|
||||
|
||||
Reference in New Issue
Block a user