logoalt Hacker News

landr0id • today at 3:42 AM • 0 replies • view on HN

>As a seasoned C programmer, I can immediately observe that the whole API is bad: the caller is expected to calculate the buffer length in their own, using a nontrivial formula, and the caller does not pass in the output buffer length, so the implementation cannot validate it. But apparently OpenSSL 4 also implemented it wrong and wrote (possibly far) past the end of the buffer.

Many such cases.

I expect we'll see some fun libyuv bugs soon in applications which decode media. The APIs are begging for misuse.

https://chromium.googlesource.com/libyuv/libyuv/+/refs/heads...