PSA: Replacing API of byte-order functions

6 views
Skip to first unread message

Harald Alvestrand

unread,
Feb 17, 2026, 6:39:38 AM (21 hours ago) Feb 17
to discuss...@googlegroups.com
If your app never uses rtc_base/byte_order.h, you can stop reading now.

The byte order functions in the above mentioned file had an unsafe interface; they used a void* to indicate their destination, and the caller had to ensure that this pointed into a buffer large enough to hold the result.

As part of the general effort to avoid uncheckable buffer writes in WebRTC and Chromium, this API is being replaced with an API that takes a webrtc::ArrayView argument (which is analogous to std::span, and eventually will become that). Conversion to the new functions should mostly be trivial.

The new functions have been added and the old ones mostly deprecated; at some point, no earlier than March 1, the deprecated functions will be deleted.

To follow along on the work, monitor https://crbug.com/webrtc/484070270

Harald, for the WebRTC team.

Reply all
Reply to author
Forward
0 new messages