From 509947b9f98af796abb3de24a1239b214b729ef0 Mon Sep 17 00:00:00 2001 From: Blixibon Date: Sat, 16 May 2026 16:55:25 -0500 Subject: [PATCH 1/3] Fix lack of bounds checking in pose parameter functions --- sp/src/game/client/c_baseanimating.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sp/src/game/client/c_baseanimating.cpp b/sp/src/game/client/c_baseanimating.cpp index 76677d78b36..573b3efd647 100644 --- a/sp/src/game/client/c_baseanimating.cpp +++ b/sp/src/game/client/c_baseanimating.cpp @@ -1472,7 +1472,7 @@ float C_BaseAnimating::GetPoseParameter( int iPoseParameter ) if ( pStudioHdr->GetNumPoseParameters() < iPoseParameter ) return 0.0f; - if ( iPoseParameter < 0 ) + if ( iPoseParameter < 0 || iPoseParameter >= MAXSTUDIOPOSEPARAM ) return 0.0f; return m_flPoseParameter[iPoseParameter]; @@ -6089,7 +6089,7 @@ float C_BaseAnimating::SetPoseParameter( CStudioHdr *pStudioHdr, int iParameter, return flValue; } - if (iParameter >= 0) + if (iParameter >= 0 || iParameter < MAXSTUDIOPOSEPARAM) { float flNewValue; flValue = Studio_SetPoseParameter( pStudioHdr, iParameter, flValue, flNewValue ); From 93b8fb1f90d1be2f3c046a52f147e034bfce360d Mon Sep 17 00:00:00 2001 From: Blixibon Date: Sun, 17 May 2026 11:43:21 -0500 Subject: [PATCH 2/3] Fix incorrect logic in bounds checking fix --- sp/src/game/client/c_baseanimating.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sp/src/game/client/c_baseanimating.cpp b/sp/src/game/client/c_baseanimating.cpp index 573b3efd647..790752522a8 100644 --- a/sp/src/game/client/c_baseanimating.cpp +++ b/sp/src/game/client/c_baseanimating.cpp @@ -6089,7 +6089,7 @@ float C_BaseAnimating::SetPoseParameter( CStudioHdr *pStudioHdr, int iParameter, return flValue; } - if (iParameter >= 0 || iParameter < MAXSTUDIOPOSEPARAM) + if (iParameter >= 0 && iParameter < MAXSTUDIOPOSEPARAM) { float flNewValue; flValue = Studio_SetPoseParameter( pStudioHdr, iParameter, flValue, flNewValue ); From ad9e3bb25f9b3cfeefbaf28bf487ca1f274e5253 Mon Sep 17 00:00:00 2001 From: Blixibon Date: Sun, 17 May 2026 12:21:43 -0500 Subject: [PATCH 3/3] Add "-noscripting_client" launch parameter for disabling clientside VScript separately from serverside VScript --- sp/src/game/client/cdll_client_int.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sp/src/game/client/cdll_client_int.cpp b/sp/src/game/client/cdll_client_int.cpp index bd23e18db95..9a923687288 100644 --- a/sp/src/game/client/cdll_client_int.cpp +++ b/sp/src/game/client/cdll_client_int.cpp @@ -1022,7 +1022,7 @@ int CHLClient::Init( CreateInterfaceFn appSystemFactory, CreateInterfaceFn physi if (!g_pMatSystemSurface) return false; - if ( !CommandLine()->CheckParm( "-noscripting") ) + if ( !CommandLine()->CheckParm( "-noscripting" ) && !CommandLine()->CheckParm( "-noscripting_client" ) ) { scriptmanager = (IScriptManager *)appSystemFactory( VSCRIPT_INTERFACE_VERSION, NULL );