Adding strlcpy and strlcat replacements to libradius

Alan DeKok aland at
Tue Sep 20 02:35:26 CEST 2005

Nicolas Baradakis <nbk at> 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:


  Alan DeKok.

More information about the Freeradius-Devel mailing list