Jelajahi Sumber

pfs: Fix reading filenames past the buffer end

rkfg 2 tahun lalu
induk
melakukan
753bc3a448
1 mengubah file dengan 1 tambahan dan 0 penghapusan
  1. 1 0
      src/core/file_sys/partition_filesystem.cpp

+ 1 - 0
src/core/file_sys/partition_filesystem.cpp

@@ -47,6 +47,7 @@ PartitionFilesystem::PartitionFilesystem(VirtualFile file) {
     // Actually read in now...
     std::vector<u8> 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;