Skip to content

Commit

Permalink
fix null deref when renaming a file on switch.
Browse files Browse the repository at this point in the history
  • Loading branch information
ITotalJustice committed Nov 27, 2024
1 parent 944cb5b commit 95749e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/platform/nx/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ int fsdev_wrapTranslatePath(const char *path, FsFileSystem** device, char *outpa

for (int i = 0; i < FsDevWrap_DEVICES_MAX; i++) {
if (g_fsdev_entries[i].active && !strncmp(path, g_fsdev_entries[i].path, device_name_len)) {
*device = &g_fsdev_entries[i].fs;
if (device) {
*device = &g_fsdev_entries[i].fs;
}
if (g_fsdev_entries[i].shortcut) {
sprintf(outpath, "/%s/%s", g_fsdev_entries[i].shortcut, colon + 1);
} else {
Expand Down

0 comments on commit 95749e5

Please sign in to comment.