30 Jul
2012
30 Jul
'12
7:41 a.m.
Hello list! Currently we have 11:32 [0] fbsd8# egrep -RI 'strn?cpy' . 2>/dev/null | wc -l 44 items which are mostly strcpy. Maybe we can add strlcpy() to linux sysdep code and convert most of these calls? I can provide patch if needed
14 Aug
14 Aug
11:33 p.m.
On 2012-07-30, at 10:41, Alexander V. Chernikov <melifaro@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@f-solutions.fi +358405422321
5051
Age (days ago)
5066
Last active (days ago)
1 comments
2 participants
participants (2)
-
Alexander V. Chernikov -
Juho Juopperi