Files
Michael Froman 79c0eba362 Bug 2058693 - Vendor libwebrtc from 6673ac14b3
Upstream commit: https://webrtc.googlesource.com/src/+/6673ac14b3eaa09dbfe09798d3696c9222961b5e
    Fix saturated_cast double to int64_t conversion near overflow

    When converting double values near int64_t::max() (e.g. 2^63 - 8),
    std::numeric_limits<int64_t>::max() cast to double rounds up to 2^63.
    This causes the upper bound check to falsely succeed, leading to
    undefined behavior or negative results upon conversion.

    This is fixed by using PowerOfTwo to perform exact boundary checks
    for floating-point sources.

    Fixed: webrtc:42220971
    Change-Id: I70e455566a6e3d6999f77ab31f3675435f542714
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/491740
    Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
    Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#48234}
2026-08-14 22:34:48 +00:00

32 lines
1.0 KiB
Diff

From: Nico Grunbaum <na-g@nostrum.com>
Date: Thu, 23 May 2024 17:28:00 +0000
Subject: Bug 1897459 - P0 - for BSD do not build physical_socket_server in
libwebrtc;r=mjf,webrtc-reviewers
libwebrtc added the use of several non-portable socket options in this code.
Firefox does not use any of the code in this file, but there is a header dependency chain leading from code that is used.
Differential Revision: https://phabricator.services.mozilla.com/D210858
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/4e7b3c485e549e7e35b227b517acadbbad957004
---
rtc_base/BUILD.gn | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index d32aa81772..d328c609f1 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -1100,6 +1100,12 @@ rtc_library("threading") {
"thread.cc",
"thread.h",
]
+ if (is_bsd && build_with_mozilla) {
+ sources -= [
+ "physical_socket_server.cc",
+ "physical_socket_server.h",
+ ]
+ }
deps = [
":async_dns_resolver",
":checks",