mirror of
https://github.com/tomasriveral/NoteWrapper.git
synced 2026-10-10 17:03:04 +02:00
Fix: prevent cases where // in paths could broke stat()
This commit is contained in:
1 parent
5c87ac0aa2
commit
3fb2a32b83
1 file changed
+1
-1
+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