Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by WhyNotHugo

5 days ago

No mention of strlcpy (which was the safe replacement for strncpy in the stdlib about 15 years ago when I first heard of the former).

Apparently strscpy handles un-terminated input strings a bit better than strlcpy, but not scanning past the given length.

0 comments

WhyNotHugo

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities