From 4bc0274d53d0895602b9243eff61a28339f58ec2 Mon Sep 17 00:00:00 2001 From: shenweip <1037567878@qq.com> Date: Sun, 5 Jan 2020 22:11:43 +0800 Subject: [PATCH] Check invalid address in sceMpegAtracDecode. Fixes #11026. --- Core/HLE/sceMpeg.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp index 43f30b9ce6..4f7e119e4e 100644 --- a/Core/HLE/sceMpeg.cpp +++ b/Core/HLE/sceMpeg.cpp @@ -1898,6 +1898,11 @@ static u32 sceMpegAtracDecode(u32 mpeg, u32 auAddr, u32 bufferAddr, int init) 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); SceMpegAu atracAu;