From 1f2480fff31c60f8a960a291ab4a91c2f47e68c9 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 18 May 2013 10:21:21 -0700 Subject: [PATCH] Add a bounds check for interrupts. --- Core/HLE/sceKernelInterrupt.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Core/HLE/sceKernelInterrupt.cpp b/Core/HLE/sceKernelInterrupt.cpp index 1242eef768..c7dcc9a8ae 100644 --- a/Core/HLE/sceKernelInterrupt.cpp +++ b/Core/HLE/sceKernelInterrupt.cpp @@ -431,6 +431,8 @@ SubIntrHandler *__RegisterSubIntrHandler(u32 intrNumber, u32 subIntrNumber, u32 int __ReleaseSubIntrHandler(int intrNumber, int subIntrNumber) { + if (intrNumber >= PSP_NUMBER_INTERRUPTS) + return -1; if (!intrHandlers[intrNumber]->has(subIntrNumber)) return -1;