News for hackers. Stuff that matters.
Re:Git's list of banned C functions by schlupa on Friday March 05, 2021 @10:24AM (#26357808)
It's 4 lines of code to implement it. So even if it is not available on a platform (glibc mmmh because of Dreppers stubborness), it's no problem.

    size_t strlcpy(char *dst, const char *src, size_t dstsize)
    {
       size_t len = strlen(src);
      if(dstsize)
        *((char*)mempcpy(dst, src, min(len, dstsize-1))) = 0;
      return len;
    }

There are no comments on this comment yet.