News for hackers. Stuff that matters.
Re:I'm Not a Fan of Strlcpy(3) by pdpi on Monday July 15, 2024 @10:00AM (#40967974)
By that metric, C can't represent ASCII correctly either, because there's no particular reason you couldn't have a NUL character somewhere inside a string.
Re:I'm Not a Fan of Strlcpy(3) by TeMPOraL on Monday July 15, 2024 @11:17AM (#40968616)
Indeed it can't. Many developers were bitten by this, and still are; plenty of critical bugs and security vulnerabilities rely on this quirk too.
Re:I'm Not a Fan of Strlcpy(3) by account42 on Monday July 15, 2024 @11:37AM (#40968825)
Technically, C can. It's just C strings that are limited.
Re:I'm Not a Fan of Strlcpy(3) by pdpi on Monday July 15, 2024 @11:40AM (#40968854)
Sure, in the exact same way that C can handle unicode just fine too. The problem is, as always, C strings.