From 753bc3a448108f2dc55400949cc45653643f6d27 Mon Sep 17 00:00:00 2001 From: rkfg Date: Thu, 21 Sep 2023 05:12:05 +0300 Subject: pfs: Fix reading filenames past the buffer end --- src/core/file_sys/partition_filesystem.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/core/file_sys') diff --git a/src/core/file_sys/partition_filesystem.cpp b/src/core/file_sys/partition_filesystem.cpp index 2527ae606..2422cb51b 100644 --- a/src/core/file_sys/partition_filesystem.cpp +++ b/src/core/file_sys/partition_filesystem.cpp @@ -47,6 +47,7 @@ PartitionFilesystem::PartitionFilesystem(VirtualFile file) { // Actually read in now... std::vector file_data = file->ReadBytes(metadata_size); const std::size_t total_size = file_data.size(); + file_data.push_back(0); if (total_size != metadata_size) { status = Loader::ResultStatus::ErrorIncorrectPFSFileSize; -- cgit v1.2.3