From 52e22b253d7b7d2419a9fb22e2f40c5aeeaa821d Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Tue, 26 Mar 2024 19:02:09 -0400 Subject: [Bugfix] ft_assemble_path extra slashes, Volume unmound double free Change-Id: Ie2e7702d8e252ce29af0b9dbd2e8d9e892b9ca18 --- firmware/include/dircache_redirect.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'firmware/include/dircache_redirect.h') 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) static inline void volume_onmount_internal(IF_MV_NONVOID(int volume)) { -#if (defined(HAVE_MULTIVOLUME) || (defined(HAVE_MULTIBOOT) && !defined(BOOTLOADER))) - char path[VOL_MAX_LEN+2]; -#endif #if defined(HAVE_MULTIBOOT) && !defined(SIMULATOR) && !defined(BOOTLOADER) + char path[VOL_MAX_LEN+2]; char rtpath[MAX_PATH / 2]; make_volume_root(volume, path); @@ -185,6 +183,7 @@ standard_redirect: root_mount_path(RB_ROOT_CONTENTS_DIR, NSITEM_CONTENTS); } #elif defined(HAVE_MULTIVOLUME) + char path[VOL_MAX_LEN+2]; make_volume_root(volume, path); root_mount_path(path, RB_ROOT_VOL_HIDDEN(volume) ? NSITEM_HIDDEN : 0); if (volume == path_strip_volume(RB_ROOT_CONTENTS_DIR, NULL, false)) -- cgit v1.2.3