* Robin Kuzmin <kuzmin.robin@xxxxxxxxx>, 2018-10-25, 14:56:
strncpy(buf, str, buflen - 1); if (buflen > 0) buf[buflen - 1]= '\0';
This was fixed in git a few months ago: https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=85bbb2a25391db590bd2d40f2526325e6ca6863a -- Jakub Wilk