[tf2][client][asan] A bunch of issues found by AddressSanitizer/MSVC static analyzer in client
-
Out-of-bound read found by AddressSanitizer in Youtube upload dialog,
CODEC_COUNTis10, buts_Codecslength is1or2: https://github.com/ValveSoftware/source-sdk-2013/blob/238a15a79dd2c3c151e98eea8b39e5f161a93703/src/game/client/replay/replayvideo.cpp#L31-L34 https://github.com/ValveSoftware/source-sdk-2013/blob/238a15a79dd2c3c151e98eea8b39e5f161a93703/src/game/client/replay/replayvideo.cpp#L50-L54 https://github.com/ValveSoftware/source-sdk-2013/blob/238a15a79dd2c3c151e98eea8b39e5f161a93703/src/game/client/replay/replayvideo.cpp#L128-L132 -
Potential out of bounds read from
g_KillStreakEffectsBlueasAssertis absent in Release mode andARRAYSIZE( g_KillStreakEffectsBase ) > ARRAYSIZE( g_KillStreakEffectsBlue(found by MSVC static analyzer): https://github.com/ValveSoftware/source-sdk-2013/blob/238a15a79dd2c3c151e98eea8b39e5f161a93703/src/game/client/tf/c_tf_player.cpp#L10286-L10296 -
Potential array
pEntitiesunderflow (iCurTranslucentEntitymay become-1- noticepEntitiesaccess first, index check second) (found by MSVC static analyzer): https://github.com/ValveSoftware/source-sdk-2013/blob/238a15a79dd2c3c151e98eea8b39e5f161a93703/src/game/client/viewrender.cpp#L4601 https://github.com/ValveSoftware/source-sdk-2013/blob/238a15a79dd2c3c151e98eea8b39e5f161a93703/src/game/client/viewrender.cpp#L4647