diff options
author | William Wilgus <wilgus.william@gmail.com> | 2024-03-26 19:02:09 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2024-03-29 10:27:03 -0400 |
commit | 52e22b253d7b7d2419a9fb22e2f40c5aeeaa821d (patch) | |
tree | 2869286de851e0a7affd2b7061a1b93cb2fb4710 /firmware/include | |
parent | 19f21a2b3f75b38d313a3d9a1f87a537211c0204 (diff) | |
download | rockbox-52e22b253d7b7d2419a9fb22e2f40c5aeeaa821d.tar.gz rockbox-52e22b253d7b7d2419a9fb22e2f40c5aeeaa821d.zip |
[Bugfix] ft_assemble_path extra slashes, Volume unmound double free
Change-Id: Ie2e7702d8e252ce29af0b9dbd2e8d9e892b9ca18
Diffstat (limited to 'firmware/include')
-rw-r--r-- | firmware/include/dircache_redirect.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/firmware/include/dircache_redirect.h b/firmware/include/dircache_redirect.h index 36f68b7251..f51ce70690 100644 --- a/firmware/include/dircache_redirect.h +++ b/firmware/include/dircache_redirect.h | |||
@@ -139,10 +139,8 @@ static inline void fileop_onsync_internal(struct filestr_base *stream) | |||
139 | 139 | ||
140 | static inline void volume_onmount_internal(IF_MV_NONVOID(int volume)) | 140 | static inline void volume_onmount_internal(IF_MV_NONVOID(int volume)) |
141 | { | 141 | { |
142 | #if (defined(HAVE_MULTIVOLUME) || (defined(HAVE_MULTIBOOT) && !defined(BOOTLOADER))) | ||
143 | char path[VOL_MAX_LEN+2]; | ||
144 | #endif | ||
145 | #if defined(HAVE_MULTIBOOT) && !defined(SIMULATOR) && !defined(BOOTLOADER) | 142 | #if defined(HAVE_MULTIBOOT) && !defined(SIMULATOR) && !defined(BOOTLOADER) |
143 | char path[VOL_MAX_LEN+2]; | ||
146 | char rtpath[MAX_PATH / 2]; | 144 | char rtpath[MAX_PATH / 2]; |
147 | make_volume_root(volume, path); | 145 | make_volume_root(volume, path); |
148 | 146 | ||
@@ -185,6 +183,7 @@ standard_redirect: | |||
185 | root_mount_path(RB_ROOT_CONTENTS_DIR, NSITEM_CONTENTS); | 183 | root_mount_path(RB_ROOT_CONTENTS_DIR, NSITEM_CONTENTS); |
186 | } | 184 | } |
187 | #elif defined(HAVE_MULTIVOLUME) | 185 | #elif defined(HAVE_MULTIVOLUME) |
186 | char path[VOL_MAX_LEN+2]; | ||
188 | make_volume_root(volume, path); | 187 | make_volume_root(volume, path); |
189 | root_mount_path(path, RB_ROOT_VOL_HIDDEN(volume) ? NSITEM_HIDDEN : 0); | 188 | root_mount_path(path, RB_ROOT_VOL_HIDDEN(volume) ? NSITEM_HIDDEN : 0); |
190 | if (volume == path_strip_volume(RB_ROOT_CONTENTS_DIR, NULL, false)) | 189 | if (volume == path_strip_volume(RB_ROOT_CONTENTS_DIR, NULL, false)) |