Skip to content

Commit

Permalink
Revert "Fix buffer overflow in ulpfec recovery"
Browse files Browse the repository at this point in the history
This reverts commit 865feab.

Reason for revert: didn't fix the overlow

Original change's description:
> Fix buffer overflow in ulpfec recovery
> 
> Bug: chromium:856823
> Change-Id: I21fe21789ed3efbf71b5d3e234740a50c7911f6c
> Reviewed-on: https://webrtc-review.googlesource.com/88228
> Reviewed-by: Rasmus Brandt <[email protected]>
> Commit-Queue: Danil Chapovalov <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#23947}

[email protected],[email protected]

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: chromium:856823
Change-Id: I095b93ffa1754e1923ab58a7fa61575b6e2fd83a
Reviewed-on: https://webrtc-review.googlesource.com/88720
Reviewed-by: Danil Chapovalov <[email protected]>
Commit-Queue: Danil Chapovalov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#23982}
  • Loading branch information
DanilChapovalov authored and Commit Bot committed Jul 16, 2018
1 parent 01cee07 commit 3643aef
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/rtp_rtcp/source/forward_error_correction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -609,8 +609,8 @@ void ForwardErrorCorrection::XorPayloads(const Packet& src,
size_t dst_offset,
Packet* dst) {
// XOR the payload.
RTC_CHECK_LE(kRtpHeaderSize + payload_length, sizeof(src.data));
RTC_CHECK_LE(dst_offset + payload_length, sizeof(dst->data));
RTC_DCHECK_LE(kRtpHeaderSize + payload_length, sizeof(src.data));
RTC_DCHECK_LE(dst_offset + payload_length, sizeof(dst->data));
for (size_t i = 0; i < payload_length; ++i) {
dst->data[dst_offset + i] ^= src.data[kRtpHeaderSize + i];
}
Expand All @@ -627,8 +627,7 @@ bool ForwardErrorCorrection::RecoverPacket(const ReceivedFecPacket& fec_packet,
recovered_packet->seq_num = protected_packet->seq_num;
} else {
XorHeaders(*protected_packet->pkt, recovered_packet->pkt);
XorPayloads(*protected_packet->pkt,
protected_packet->pkt->length - kRtpHeaderSize,
XorPayloads(*protected_packet->pkt, protected_packet->pkt->length,
kRtpHeaderSize, recovered_packet->pkt);
}
}
Expand Down

0 comments on commit 3643aef

Please sign in to comment.