Skip to content

Commit

Permalink
Fix local-buffer overrun, may undefined behavior with hitbox blending…
Browse files Browse the repository at this point in the history
… or crash (reverse-engineering mistake)
  • Loading branch information
s1lentq committed Feb 6, 2021
1 parent 1690200 commit 722e19d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rehlds/engine/r_studio.cpp
Expand Up @@ -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],
Expand All @@ -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);
Expand Down

0 comments on commit 722e19d

Please sign in to comment.