commit f8d60bf210fe05a22a3127abf564eeb31890518f
parent 0aaaf2d1cc10a7ee84708930043256bbe9c31a74
Author: Dan Baker <dbaker@mozilla.com>
Date: Mon, 27 Oct 2025 15:11:49 -0600
Bug 1995393 - Vendor libwebrtc from f6a73f2457
Upstream commit: https://webrtc.googlesource.com/src/+/f6a73f2457b46e0cf8c0e5ead7fdbdc36e5baaff
Check bitstream reader before failing parsing Pps
To silence DCHECK in that class that read wasn't validated.
There should be no practical difference as parse is failed either way.
Bug: chromium:441805812, chromium:441816633
Change-Id: Id11dc7405609aa13f30307e12df3cba7f4720f4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/407000
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45482}
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor
@@ -1,4 +1,4 @@
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
-libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-27T21:09:35.582616+00:00.
+libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-27T21:11:37.673949+00:00.
# base of lastest vendoring
-c090facce1
+f6a73f2457
diff --git a/third_party/libwebrtc/common_video/h264/pps_parser.cc b/third_party/libwebrtc/common_video/h264/pps_parser.cc
@@ -134,7 +134,8 @@ std::optional<PpsParser::PpsState> PpsParser::ParseInternal(
pps.num_ref_idx_l0_default_active_minus1 = reader.ReadExponentialGolomb();
// num_ref_idx_l1_default_active_minus1: ue(v)
pps.num_ref_idx_l1_default_active_minus1 = reader.ReadExponentialGolomb();
- if (pps.num_ref_idx_l0_default_active_minus1 > H264::kMaxReferenceIndex ||
+ if (!reader.Ok() ||
+ pps.num_ref_idx_l0_default_active_minus1 > H264::kMaxReferenceIndex ||
pps.num_ref_idx_l1_default_active_minus1 > H264::kMaxReferenceIndex) {
return std::nullopt;
}