In article [ref] (at Fri, 28 Nov 2003 00:03:29 +0100), Felipe Alfaro Solana [off-list ref] says:
So, as I see:
1. We should fix strncpy()
2. I should replace strlcpy() with strncpy() in my patches.
I think it is NOT correct.
It SEEMS unsafe to use strncpy() even if it terminated
string correctly.
So, I'd suggest to replace
strlcpy(dst, src, len);
with
1) strlcpy0(dst, src, len);
where strlcpy0() is provided in my previous mail,
or with
2) memset(dst, 0, len);
strncpy(dst, src, len);
(or say, strncpy0())
or, with
3) if (len)
strncpy(dst, src, len - 1);
dst[len] = 0;
(or, say, strncpy0()).
--yoshfuji