From b9af81eb3307e9039f452b693848efd14e2ad0f4 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 7e63a6bbe29..4ae85c70832 100644 --- a/sp/src/game/client/c_baseanimating.cpp +++ b/sp/src/game/client/c_baseanimating.cpp @@ -1468,7 +1468,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]; @@ -6054,7 +6054,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 2edf4ed9c07ee90b8eb047f1dbf78c33760f2195 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 4ae85c70832..f74f4107a90 100644 --- a/sp/src/game/client/c_baseanimating.cpp +++ b/sp/src/game/client/c_baseanimating.cpp @@ -6054,7 +6054,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 d9fd33535849b70f647895077b6b011b229c373c 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 ea23d800ff0..153b5eb15c4 100644 --- a/sp/src/game/client/cdll_client_int.cpp +++ b/sp/src/game/client/cdll_client_int.cpp @@ -967,7 +967,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 );