commit | a9770a4da6ee5d85636b7a852543b4793059f6f0 | [log] [tgz] |
---|---|---|
author | Henrik Boström <hbos@chromium.org> | Tue Apr 12 08:22:45 2022 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Apr 12 08:22:45 2022 |
tree | 92d43710f01066d93021859f6ba7d9db422ed115 | |
parent | 729bb0f42d9c5151544f39cbc7fd01a612e63576 [diff] |
RtpContributingSourceCache: Avoid theoretical use-after-free. The `pc_` reference is a WeakPersistent, so it could become null causing MaybeUpdateRtpSources() not to update the sources, resulting in `rtp_sources` being null. This CL adds a guard to prevent use-after-free. Just a sanity check - I don't think this can happen in practise due to RTCRtpReceiver having a strong reference to the PC which would prevent the PC from going away while calling getContributingSources() is still a possibility. But in case some assumption changes in the future... Bug: chromium:1150311 Change-Id: If66cc8492f457c145f380adbbebaf1ab594974d7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3578751 Reviewed-by: Harald Alvestrand <hta@chromium.org> Commit-Queue: Henrik Boström <hbos@chromium.org> Cr-Commit-Position: refs/heads/main@{#991405}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.