19 Sep
2005
19 Sep
'05
8:35 p.m.
Nicolas Baradakis <nbk@sitadelle.com> wrote:
I know that our home-made strNcpy already ensures NUL-terminaison, but it has some weakness: - it seems it's wrong when N <= 0 - it's not easy to check if truncation has occurred
I agree.
I don't plan to change the code everywhere, but I'd like to have the functions available when writing new code.
strNcpy should be deleted, and all calls to it replaced with strlcpy.
If I get approbation, I suggest to bring the following files in libradius. As to my understanding their licence allows us to do that: ftp://ftp.openbsd.org/pub/OpenBSD/src/lib/libc/string/strlcpy.c ftp://ftp.openbsd.org/pub/OpenBSD/src/lib/libc/string/strlcat.c
Yes. Alan DeKok.