News for hackers. Stuff that matters.
Re:Banned C standard library functions in Git source code by commandlinefan on Monday August 26, 2019 @10:22AM (#20800075)
That was my first thought. No strncpy? Ok,

  while (*s1 && n--)  {
    *s2++ = *s1++;
  }
  *s2 = '\0';
it is, then.
Re:Banned C standard library functions in Git source code by fwsgonzo on Monday August 26, 2019 @10:50AM (#20800323)
I don't think strncpy is the function you are looking for, either. Its for zeroing fixed-size character buffers. And it doesn't indicate problems.

https://blog.liw.fi/posts/strncpy/