News for hackers. Stuff that matters.
Re:Git's list of banned C functions by loeg on Thursday March 04, 2021 @08:36PM (#26351306)
Truncation, even if it is wrong in an application logic sense, is strictly superior to UB (and in practice, buffer overruns, which can be exploitable). That's the main benefit of strlcpy/strlcat. It is certainly possible to construct a security bug due through truncation! But it is much more common to have security bugs from uncontrolled buffer overruns.

There are no comments on this comment yet.