News for hackers. Stuff that matters.
Re:OpenSSL: Buffer overflow in EVP_EncodeBlock() (CVE-2026-1... by userbinator on Thursday November 19, 2026 @11:57PM (#50570346)
takes an input buffer and output buffer of differing lengths, the right API has the caller pass both lengths.

If there is no fixed relationship between the two, then that makes sense; but in this case there is a very simple and well-defined relationship between them. But to specify two lengths which must always agree; and if not, then what? You've effectively invented an additional artificial error condition, an additional branch, and burdened all the callers up the chain to do something, which is a treacherous path to complexity and the production of even more bugs.

Or are you just preaching the same mindless idiocy that lead to Microsoft's memcpy_s() (the "s" is for "stupid")?

Re:OpenSSL: Buffer overflow in EVP_EncodeBlock() (CVE-2026-1... by baq on Friday November 20, 2026 @02:48AM (#50571446)
The artificial error condition is the whole point and the hoops you have to jump through to be able to reach it as you say are reasons to not use C because it’s hard to enforce invariants like this and easy to ignore them with mostly working code. Mostly working was fine last year, it isn’t anymore.