logoalt Hacker News

naturalmovementyesterday at 10:34 PM2 repliesview on HN

A reminder that we've had strlcpy[1] for ~ 30 years but it was never accepted into the Linux world because of typical petty open source bullshit. This is why we can't have nice things.

[1] https://man.openbsd.org/strlcpy


Replies

ericbarrettyesterday at 11:46 PM

The Linux kernel had strlcpy over 20 years ago. It was removed in favor of strscpy because the latter was judged a better interface. Here's a 2022 article: https://lwn.net/Articles/905777/

show 1 reply
BoingBoomTschakyesterday at 11:01 PM

Actually, glibc 2.38 has it.

show 1 reply