Skip to content

Commit

Permalink
Don't read data more than data size of pgd files.
Browse files Browse the repository at this point in the history
  • Loading branch information
shenweip committed Sep 12, 2020
1 parent 6c9b9b5 commit 766bd8e
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 766bd8e

Please sign in to comment.