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}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See here for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.