mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
Merge pull request #11553 from rkfg/pfs-fix
pfs: Fix reading filenames past the buffer end
This commit is contained in:
commit
2ffea42ec8
@ -47,6 +47,7 @@ PartitionFilesystem::PartitionFilesystem(VirtualFile file) {
|
|||||||
// Actually read in now...
|
// Actually read in now...
|
||||||
std::vector<u8> file_data = file->ReadBytes(metadata_size);
|
std::vector<u8> file_data = file->ReadBytes(metadata_size);
|
||||||
const std::size_t total_size = file_data.size();
|
const std::size_t total_size = file_data.size();
|
||||||
|
file_data.push_back(0);
|
||||||
|
|
||||||
if (total_size != metadata_size) {
|
if (total_size != metadata_size) {
|
||||||
status = Loader::ResultStatus::ErrorIncorrectPFSFileSize;
|
status = Loader::ResultStatus::ErrorIncorrectPFSFileSize;
|
||||||
|
Loading…
Reference in New Issue
Block a user