From 722e19df31052d4ae1758007ef9a28c440e29732 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Sat, 6 Feb 2021 20:13:38 +0700 Subject: [PATCH] Fix local-buffer overrun, may undefined behavior with hitbox blending or crash (reverse-engineering mistake) --- rehlds/engine/r_studio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rehlds/engine/r_studio.cpp b/rehlds/engine/r_studio.cpp index d841aee..71e688a 100644 --- a/rehlds/engine/r_studio.cpp +++ b/rehlds/engine/r_studio.cpp @@ -785,7 +785,7 @@ hull_t *SV_HullForStudioModel(const edict_t *pEdict, const vec_t *mins, const ve int iBlend; R_StudioPlayerBlend(pseqdesc, &iBlend, angles); - unsigned char blending = (unsigned char)iBlend; + unsigned char blending[2] = { (unsigned char)iBlend, 0 }; unsigned char controller[4] = { 0x7F, 0x7F, 0x7F, 0x7F }; return R_StudioHull( g_psv.models[pEdict->v.modelindex], @@ -795,7 +795,7 @@ hull_t *SV_HullForStudioModel(const edict_t *pEdict, const vec_t *mins, const ve pEdict->v.origin, size, controller, - &blending, + blending, pNumHulls, pEdict, bSkipShield);