From 18a841c8504efd64c5ace9e897795953a69ec026 Mon Sep 17 00:00:00 2001 From: Rajko Stojadinovic Date: Sat, 28 Jul 2018 04:04:03 +0200 Subject: [PATCH] Always send buffer of size FS_MAX_PATH in fsOpenFileSystemWithId --- nx/source/services/fs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nx/source/services/fs.c b/nx/source/services/fs.c index 67bea830..ebf4a37b 100644 --- a/nx/source/services/fs.c +++ b/nx/source/services/fs.c @@ -431,9 +431,13 @@ Result fsOpenFileSystem(FsFileSystem* out, u64 titleId, FsFileSystemType fsType) } Result fsOpenFileSystemWithId(FsFileSystem* out, u64 titleId, FsFileSystemType fsType, const char* contentPath) { + char sendStr[FS_MAX_PATH]; + strncpy(sendStr, contentPath, sizeof(sendStr)); + sendStr[sizeof(sendStr)-1] = 0; + IpcCommand c; ipcInitialize(&c); - ipcAddSendStatic(&c, contentPath, strlen(contentPath)+1, 0); + ipcAddSendStatic(&c, sendStr, sizeof(sendStr), 0); struct { u64 magic;