Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #13418 from shenweip/io-npdrm
Browse files Browse the repository at this point in the history
IO:Don't read data more than data size of pgd files.
  • Loading branch information
hrydgard committed Sep 12, 2020
2 parents 6c9b9b5 + 766bd8e commit a52a066
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Core/HLE/sceIo.cpp
Expand Up @@ -967,6 +967,8 @@ static u32 npdrmRead(FileNode *f, u8 *data, int size) {
block = pgd->file_offset/pgd->block_size;
offset = pgd->file_offset%pgd->block_size;

if (size > pgd->data_size)
size = pgd->data_size;
remain_size = size;

while(remain_size){
Expand Down

0 comments on commit a52a066

Please sign in to comment.