From 037bd3109ec0c543753b5f1b4acfda952914cb99 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Fri, 25 Sep 2015 21:00:16 +0200 Subject: [PATCH] pcsx2: extend the size of plugin m_info array to avoid out-of-bounds Note: previous fix +1 wasn't enough. --- pcsx2/Config.h | 3 ++- pcsx2/Plugins.h | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pcsx2/Config.h b/pcsx2/Config.h index d8561b0e53..c9aee4ca12 100644 --- a/pcsx2/Config.h +++ b/pcsx2/Config.h @@ -34,7 +34,8 @@ enum PluginsEnum_t // time. So it's placed afer PluginId_Count so that it doesn't show up in the conf // screens or other plugin tables. - PluginId_Mcd + PluginId_Mcd, + PluginId_AllocCount // Extra value for correct array allocation }; enum GamefixId diff --git a/pcsx2/Plugins.h b/pcsx2/Plugins.h index bd4c8c5ce4..9177963a8c 100644 --- a/pcsx2/Plugins.h +++ b/pcsx2/Plugins.h @@ -298,8 +298,7 @@ protected: volatile u32 m_mcdOpen; public: // hack until we unsuck plugins... - // +1 to avoid out-of-bounds due to PluginId_Mcd which is above PluginId_Count - ScopedPtr m_info[PluginId_Count + 1]; + ScopedPtr m_info[PluginId_AllocCount]; public: SysCorePlugins();