On 4/13/23 04:37, Florian Weimer wrote: > This makes it defined to call strlcpy with an incorrect (too small) > destination buffer size as long as the source string is short enough. > Is this really necessary? The fortified implementation checks the > destination buffer size unconditionally (like we do for other > functions), and it does not match this documentation as a result. Oh, good point. Revised patch attached. It also says behavior is undefined if the source string overlaps the destination buffer. Although the fortified implementation doesn't check that, we should preserve the ability to check for that in the future, as it's a true danger sign.