From ff907bd523c94ec5c6060c10efbc5308eeb13c1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 5 Apr 2023 09:48:03 +0200 Subject: [PATCH] Fix crash in MIPSStackWalk --- Core/MIPS/MIPSStackWalk.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/MIPS/MIPSStackWalk.cpp b/Core/MIPS/MIPSStackWalk.cpp index 8c6305f4f8..7f3589dab6 100644 --- a/Core/MIPS/MIPSStackWalk.cpp +++ b/Core/MIPS/MIPSStackWalk.cpp @@ -94,6 +94,11 @@ namespace MIPSStackWalk { stop = PSP_GetScratchpadMemoryBase(); } } + + if (!Memory::IsValidAddress(start)) { + return false; + } + if (stop < start - LONGEST_FUNCTION) { stop = start - LONGEST_FUNCTION; }