1
0
Fork 0
forked from suyu/suyu

pfs: Fix reading filenames past the buffer end

This commit is contained in:
rkfg 2023-09-21 05:12:05 +03:00
parent c708643972
commit 753bc3a448

View file

@ -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;