diff --git a/nx/source/services/fs.c b/nx/source/services/fs.c index ebeef80f..2613f3f2 100644 --- a/nx/source/services/fs.c +++ b/nx/source/services/fs.c @@ -629,9 +629,6 @@ Result fsFsQueryEntry(FsFileSystem* fs, void *out, size_t out_size, const void * if (hosversionBefore(4,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); - char send_path[FS_MAX_PATH] = {0}; - strncpy(send_path, path, sizeof(send_path)-1); - return _fsObjectDispatchIn(&fs->s, 15, query_id, .buffer_attrs = { SfBufferAttr_HipcPointer | SfBufferAttr_In, @@ -639,9 +636,9 @@ Result fsFsQueryEntry(FsFileSystem* fs, void *out, size_t out_size, const void * SfBufferAttr_HipcMapAlias | SfBufferAttr_Out | SfBufferAttr_HipcMapTransferAllowsNonSecure, }, .buffers = { - { send_path, sizeof(send_path) }, - { in, in_size }, - { out, out_size }, + { path, FS_MAX_PATH }, + { in, in_size }, + { out, out_size }, }, ); } @@ -655,7 +652,8 @@ Result fsFsIsValidSignedSystemPartitionOnSdCard(FsFileSystem* fs, bool *out) { return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); u8 tmp=0; - Result rc = fsFsQueryEntry(fs, &tmp, sizeof(tmp), NULL, 0, "/", FsFileSystemQueryId_IsValidSignedSystemPartitionOnSdCard); + char send_path[FS_MAX_PATH] = "/"; + Result rc = fsFsQueryEntry(fs, &tmp, sizeof(tmp), NULL, 0, send_path, FsFileSystemQueryId_IsValidSignedSystemPartitionOnSdCard); if (R_SUCCEEDED(rc) && out) *out = tmp & 1; return rc; }