mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-05 10:52:15 +02:00
should be sizeof()-1 for strncpy in fsOpenFileSystemWithId
This commit is contained in:
parent
18a841c850
commit
ef704044ae
@ -432,7 +432,7 @@ Result fsOpenFileSystem(FsFileSystem* out, u64 titleId, FsFileSystemType fsType)
|
|||||||
|
|
||||||
Result fsOpenFileSystemWithId(FsFileSystem* out, u64 titleId, FsFileSystemType fsType, const char* contentPath) {
|
Result fsOpenFileSystemWithId(FsFileSystem* out, u64 titleId, FsFileSystemType fsType, const char* contentPath) {
|
||||||
char sendStr[FS_MAX_PATH];
|
char sendStr[FS_MAX_PATH];
|
||||||
strncpy(sendStr, contentPath, sizeof(sendStr));
|
strncpy(sendStr, contentPath, sizeof(sendStr)-1);
|
||||||
sendStr[sizeof(sendStr)-1] = 0;
|
sendStr[sizeof(sendStr)-1] = 0;
|
||||||
|
|
||||||
IpcCommand c;
|
IpcCommand c;
|
||||||
|
Loading…
Reference in New Issue
Block a user