Re: strncpy clarify result may not be null terminated

Jonny Grant
2023-11-20T11:56:43Z

BTW, GCC has a useful warning for truncation that may help code bases that use strncpy, you've probably seen this and the article, just sharing for completeness.

warning: ‘__builtin_strncpy’ output truncated before terminating nul copying XYZ bytes from a string of the same length [-Wstringop-truncation]

Martin's article from 2019