116c84e1b0b7d584a0f04f11de9b2bdb71b25040

This is a bug that was introduced in https://codereview.webrtc.org/1230503003, where the variable "int temp_bufsize" was changed to a size_t. If the packet buffer was flushed while inserting a packet, temp_bufsize became negative, which was tested later in an if-statement. Now, with size_t instead, it would just become very large, and the if-statement would never see a negative value. The effect was that the packet size in samples could be updated with a very large positive number, causing an overflow which triggered rtc::checked_cast in StatisticsCalculator::GetNetworkStatistics, line 220. Also adding a test to reproduce the crash. Without the fix, the test results in the above mentioned checked_cast to trigger. With the fix, everything works fine. BUG=chromium:525260 Review URL: https://codereview.webrtc.org/1307893004 Cr-Commit-Position: refs/heads/master@{#9802}
Revert of Fix PRESUBMIT.py after disabling CQ. (patchset #1 id:1 of https://codereview.webrtc.org/1192673003/)
Description
No description provided
Languages
C++
88.6%
C
3.3%
Java
3%
Objective-C++
1.9%
Python
1.9%
Other
1%