Fixed out of bounds read with predef_flexcontroller_names array

This commit is contained in:
tyabus 2024-08-31 07:10:49 +05:00
parent 0d8dceea43
commit ab9eadaac8
4 changed files with 4 additions and 4 deletions

View file

@ -2485,7 +2485,7 @@ void CFlexCycler::Think( void )
m_flextarget[m_flexnum] = 0;
}
for (i = 0; i < 35 && predef_flexcontroller_names[i]; i++)
for (i = 0; i < 31 && predef_flexcontroller_names[i]; i++)
{
m_flexnum = LookupFlex( predef_flexcontroller_names[i] );
m_flextarget[m_flexnum] = predef_flexcontroller_values[j][i];

View file

@ -321,7 +321,7 @@ void CFlextalkActor::ProcessSceneEvents( void )
m_flextarget[m_flexnum] = 0;
}
for (i = 0; i < 35 && predef_flexcontroller_names[i]; i++)
for (i = 0; i < 31 && predef_flexcontroller_names[i]; i++)
{
m_flexnum = LookupFlex( predef_flexcontroller_names[i] );
m_flextarget[m_flexnum] = predef_flexcontroller_values[j][i];

View file

@ -2485,7 +2485,7 @@ void CFlexCycler::Think( void )
m_flextarget[m_flexnum] = 0;
}
for (i = 0; i < 35 && predef_flexcontroller_names[i]; i++)
for (i = 0; i < 31 && predef_flexcontroller_names[i]; i++)
{
m_flexnum = LookupFlex( predef_flexcontroller_names[i] );
m_flextarget[m_flexnum] = predef_flexcontroller_values[j][i];

View file

@ -321,7 +321,7 @@ void CFlextalkActor::ProcessSceneEvents( void )
m_flextarget[m_flexnum] = 0;
}
for (i = 0; i < 35 && predef_flexcontroller_names[i]; i++)
for (i = 0; i < 31 && predef_flexcontroller_names[i]; i++)
{
m_flexnum = LookupFlex( predef_flexcontroller_names[i] );
m_flextarget[m_flexnum] = predef_flexcontroller_values[j][i];