On Fri, 26 Oct 2018 at 00:13, Jakub Wilk <jwilk@xxxxxxxxx> wrote: > > * 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 Thanks, Jakub. I looked a bit too quickly at Robin's mail. Cheers, Michael -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/