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}
31 lines
826 B
Diff
31 lines
826 B
Diff
From: Byron Campen <docfaraday@gmail.com>
|
|
Date: Thu, 25 Jul 2024 10:07:00 -0500
|
|
Subject: Bug 1909234 - (fix-4fec6f9c67dc) Hollow out the new ssl_adapter lib.
|
|
r?mjf
|
|
|
|
Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/ee2f06666bcc6d22c4d7c93b78fb52d28452d055
|
|
---
|
|
rtc_base/BUILD.gn | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
|
|
index fb65482ba9..2dc57b0d97 100644
|
|
--- a/rtc_base/BUILD.gn
|
|
+++ b/rtc_base/BUILD.gn
|
|
@@ -1777,6 +1777,7 @@ if (!build_with_mozilla) {
|
|
}
|
|
|
|
rtc_library("ssl_adapter") {
|
|
+if (!build_with_mozilla) {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"openssl_adapter.cc",
|
|
@@ -1833,6 +1834,7 @@ rtc_library("ssl_adapter") {
|
|
configs += [ "..:external_ssl_library" ]
|
|
}
|
|
}
|
|
+}
|
|
|
|
rtc_source_set("gtest_prod") {
|
|
sources = [ "gtest_prod_util.h" ]
|