Validate dimensions and crop offsets in H.264 SPS parser Add bounds checking in SpsParser to prevent arithmetic overflow and underflow when calculating picture dimensions and crop offsets: - Validate chroma_format_idc (<= 3) and pic_order_cnt_type (<= 2). - Compute uncropped dimensions using 64-bit arithmetic and verify they do not exceed uint16_t limits. - Ensure total crop offsets do not equal or exceed uncropped dimensions, preventing underflow and zero or negative picture sizes. - Return std::nullopt on malformed parameters. Bug: chromium:516683896 Change-Id: Ib405c094f9d7b568f436033bd356039ace1104df Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/500603 Reviewed-by: Sergey Silkin <ssilkin@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/main@{#48515}
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.