Skip to content

Commit

Permalink
Bug 1822194 - Vendor libwebrtc from 36b2ad31c8
Browse files Browse the repository at this point in the history
Upstream commit: https://webrtc.googlesource.com/src/+/36b2ad31c8d06c9cbc0d7ec7331b466031d010cb
    Zero extra bytes of FEC recovered packet

    rtc::CopyOnWriteBuffer::SetSize extends buffer with uninitialized memory by design.
    It is up to the user of the rtc::CopyOnWriteBuffer to ensure it is initialized.

    (cherry picked from commit f52e0152397cda785ff311394d8275f210bd5a20)

    No-Try: true
    Bug: chromium:1403397
    Change-Id: Ic0111a84bda32379770ddb1c7d24bee10d96b7a4
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/289041
    Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
    Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
    Cr-Original-Commit-Position: refs/heads/main@{#38959}
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291540
    Reviewed-by: Per Kjellander <perkj@webrtc.org>
    Cr-Commit-Position: refs/branch-heads/5481@{#3}
    Cr-Branched-From: 2e1a9a4ae0234d4b1ea7a6fd4188afa1fb20379d-refs/heads/main@{#38901}
  • Loading branch information
docfaraday committed Apr 2, 2023
1 parent 4bf343b commit 69ff0df
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions third_party/libwebrtc/README.moz-ff-commit
Original file line number Diff line number Diff line change
Expand Up @@ -20313,3 +20313,6 @@ dc7333f9d6
# MOZ_LIBWEBRTC_SRC=/home/bcampen/checkouts/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
e0efbd45ea
# MOZ_LIBWEBRTC_SRC=/home/bcampen/checkouts/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
36b2ad31c8
2 changes: 2 additions & 0 deletions third_party/libwebrtc/README.mozilla
Original file line number Diff line number Diff line change
Expand Up @@ -13564,3 +13564,5 @@ libwebrtc updated from /home/bcampen/checkouts/moz-libwebrtc commit mozpatches o
libwebrtc updated from /home/bcampen/checkouts/moz-libwebrtc commit mozpatches on 2023-04-02T00:35:18.174938.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/bcampen/checkouts/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/bcampen/checkouts/moz-libwebrtc commit mozpatches on 2023-04-02T00:36:36.955762.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/bcampen/checkouts/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/bcampen/checkouts/moz-libwebrtc commit mozpatches on 2023-04-02T12:16:57.189418.
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,13 @@ bool ForwardErrorCorrection::FinishPacketRecovery(
"typical IP packet, and is thus dropped.";
return false;
}
size_t old_size = recovered_packet->pkt->data.size();
recovered_packet->pkt->data.SetSize(new_size);
data = recovered_packet->pkt->data.MutableData();
if (new_size > old_size) {
memset(data + old_size, 0, new_size - old_size);
}

// Set the SN field.
ByteWriter<uint16_t>::WriteBigEndian(&data[2], recovered_packet->seq_num);
// Set the SSRC field.
Expand Down

0 comments on commit 69ff0df

Please sign in to comment.