transport-cc: remove unnecessary if block

which can no longer happen since the end index and delta sizes are
checked in the surrounding condition.
Replace with a DCHECK to guard against potential errors.

BUG=None

Change-Id: I868d54c5923de773f248d10a40dbc6b2c563b0f1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231957
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@nvidia.com>
Cr-Commit-Position: refs/heads/main@{#35210}
This commit is contained in:
Philipp Hancke
2021-09-15 08:09:33 +02:00
committed by WebRTC LUCI CQ
parent 41205b3c4d
commit 90c4b7280c

View File

@ -454,11 +454,7 @@ bool TransportFeedback::Parse(const CommonHeader& packet) {
// Determine if timestamps, that is, recv_delta are included in the packet.
if (end_index >= index + recv_delta_size) {
for (size_t delta_size : delta_sizes) {
if (index + delta_size > end_index) {
RTC_LOG(LS_WARNING) << "Buffer overflow while parsing packet.";
Clear();
return false;
}
RTC_DCHECK_LE(index + delta_size, end_index);
switch (delta_size) {
case 0:
if (include_lost_)