Skip to content

Commit

Permalink
Check invalid address in sceMpegAtracDecode.
Browse files Browse the repository at this point in the history
Fixes #11026.
  • Loading branch information
shenweip committed Jan 5, 2020
1 parent f4b5810 commit 4bc0274
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Core/HLE/sceMpeg.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1898,6 +1898,11 @@ static u32 sceMpegAtracDecode(u32 mpeg, u32 auAddr, u32 bufferAddr, int init)
return -1; return -1;
} }


if (!Memory::IsValidAddress(bufferAddr) || !Memory::IsValidAddress(auAddr)) {
WARN_LOG(ME, "sceMpegAtracDecode(%08x, %08x, %08x, %i): invalid addresses", mpeg, auAddr, bufferAddr, init);
return -1;
}

DEBUG_LOG(ME, "sceMpegAtracDecode(%08x, %08x, %08x, %i)", mpeg, auAddr, bufferAddr, init); DEBUG_LOG(ME, "sceMpegAtracDecode(%08x, %08x, %08x, %i)", mpeg, auAddr, bufferAddr, init);


SceMpegAu atracAu; SceMpegAu atracAu;
Expand Down

0 comments on commit 4bc0274

Please sign in to comment.