DescriptionFix div-by-0 in NetEq's StatisticsCalculator
If a StatisticsCalculator::PeriodicUmaAverage object was created and
then deleted without any samples being logged, the destructor would call
the Metric() method, which calculated sum_/counter_. However, with no
samples logged, counter_ is 0.
This was found and verified using UBSan tests; see the bug for more info.
BUG=webrtc:5490
R=ivoc@webrtc.org
Committed: https://crrev.com/e594213a2bb6006c41ff1ecc516afc9b024d19ad
Cr-Commit-Position: refs/heads/master@{#11534}
Patch Set 1 #
Messages
Total messages: 15 (6 generated)
|