Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: webrtc/modules/pacing/paced_sender_unittest.cc

Issue 1727283002: Fix OOB read in pacing test. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/pacing/paced_sender_unittest.cc
diff --git a/webrtc/modules/pacing/paced_sender_unittest.cc b/webrtc/modules/pacing/paced_sender_unittest.cc
index f40dba3e2bdcd7cefa9ff9388f210f1eba6161c4..70ffc75c92ca243b0c702cb31fc56cb841400f29 100644
--- a/webrtc/modules/pacing/paced_sender_unittest.cc
+++ b/webrtc/modules/pacing/paced_sender_unittest.cc
@@ -725,10 +725,9 @@ TEST_F(PacedSenderTest, ProbingWithInitialFrame) {
const int kInitialBitrateKbps = 300;
uint32_t ssrc = 12346;
uint16_t sequence_number = 1234;
- const int expected_deltas[kNumDeltas] = {
- 10, 10, 10, 10, 10, 5, 5, 5, 5, 5};
+ const int expected_deltas[kNumDeltas] = {10, 10, 10, 10, 10, 5, 5, 5, 5, 5};
std::list<int> expected_deltas_list(expected_deltas,
- expected_deltas + kNumPackets - 1);
+ expected_deltas + kNumDeltas);
PacedSenderProbing callback(expected_deltas_list, &clock_);
send_bucket_.reset(
new PacedSender(&clock_,
@@ -761,7 +760,7 @@ TEST_F(PacedSenderTest, ProbingWithTooSmallInitialFrame) {
uint16_t sequence_number = 1234;
const int expected_deltas[kNumDeltas] = {10, 10, 10, 10, 10, 5, 5, 5, 5, 5};
std::list<int> expected_deltas_list(expected_deltas,
- expected_deltas + kNumPackets - 1);
+ expected_deltas + kNumDeltas);
PacedSenderProbing callback(expected_deltas_list, &clock_);
send_bucket_.reset(new PacedSender(&clock_, &callback, kInitialBitrateKbps,
kPaceMultiplier * kInitialBitrateKbps, 0));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698