use of strlcpy

Juho Juopperi jkj at f-solutions.fi
Wed Aug 15 01:33:38 CEST 2012


On 2012-07-30, at 10:41, Alexander V. Chernikov <melifaro at ipfw.ru> wrote:
...
> items which are mostly strcpy.
> Maybe we can add strlcpy() to linux sysdep code and convert most of these calls?


Just remember that strncpy pads rest of the output buffer with zeroes and strlcpy does not. If anything might depend on this, have calloc()ed output buffer or memset() before use. Otherwise strlcpy sounds like a plan.

-- 
Juho Juopperi
jkj at f-solutions.fi
+358405422321




More information about the Bird-users mailing list