From 8dc4d353e26c6c2bfa88d63ab60936afd00bc049 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Sun, 21 Mar 2021 11:03:20 +0200 Subject: [PATCH] Check for out of range. --- module/Misc/Official.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/Misc/Official.cpp b/module/Misc/Official.cpp index 6195b914..e25211e9 100644 --- a/module/Misc/Official.cpp +++ b/module/Misc/Official.cpp @@ -2254,7 +2254,8 @@ struct LgStream { else if (target.GetType() == OT_INTEGER || target.GetType() == OT_FLOAT) id = target.Cast< int32_t >(); else if (static_cast< AbstractStaticClassData * >(target.GetTypeTag()) == StaticClassTypeTag< LgPlayer >::Get()) { id = target.CastI< LgPlayer >()->GetIdentifier(); - } else STHROWF("Invalid target"); + } else STHROWF("Invalid target type"); + if (id > SQMOD_PLAYER_POOL) STHROWF("Invalid player ID"); _Func->SendClientScriptData(id, m_OutputStreamData, m_OutputStreamEnd); ClearOutput(); }