From ef704044ae56b7a2afe4069f37b89b3a549e9256 Mon Sep 17 00:00:00 2001 From: Rajko Stojadinovic Date: Sat, 28 Jul 2018 04:09:13 +0200 Subject: [PATCH] should be sizeof()-1 for strncpy in fsOpenFileSystemWithId --- nx/source/services/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx/source/services/fs.c b/nx/source/services/fs.c index ebf4a37b..fbfed5e5 100644 --- a/nx/source/services/fs.c +++ b/nx/source/services/fs.c @@ -432,7 +432,7 @@ 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)); + strncpy(sendStr, contentPath, sizeof(sendStr)-1); sendStr[sizeof(sendStr)-1] = 0; IpcCommand c;