mirror of
https://github.com/wiiu-env/ftpiiu_plugin.git
synced 2024-11-17 18:29:19 +01:00
Only return strings from heap, never stack. Fixes access to "/"
This commit is contained in:
parent
c0f4ed1863
commit
b8db1ca6a9
@ -127,7 +127,10 @@ char *to_real_path(char *virtual_cwd, char *virtual_path) {
|
|||||||
|
|
||||||
if (!strcmp("/", virtual_path)) {
|
if (!strcmp("/", virtual_path)) {
|
||||||
// indicate vfs-root with ""
|
// indicate vfs-root with ""
|
||||||
path = "";
|
path = malloc(1);
|
||||||
|
if (path) {
|
||||||
|
path[0] = 0;
|
||||||
|
}
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user