mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-25 01:44:15 +08:00
fix a buffer overrun in Steam_User_Stats::UpdateAvgRateStat
This commit is contained in:
parent
36943fbfe6
commit
10f1e89736
@ -533,7 +533,7 @@ Steam_User_Stats::InternalSetResult<std::pair<GameServerStats_Messages::StatInfo
|
||||
double oldsessionlength = 0;
|
||||
if (read_data == sizeof(data)) {
|
||||
memcpy(&oldcount, data + sizeof(float), sizeof(oldcount));
|
||||
memcpy(&oldsessionlength, data + sizeof(float) + sizeof(double), sizeof(oldsessionlength));
|
||||
memcpy(&oldsessionlength, data + sizeof(float) + sizeof(float), sizeof(oldsessionlength));
|
||||
}
|
||||
|
||||
oldcount += flCountThisSession;
|
||||
|
Loading…
x
Reference in New Issue
Block a user