Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libedit (strncpy->strlcpy)



> This feels not good.
> strncpy->strlcpy has repercussions like how strlcpy doesn't zero out the
> remaining length and thus leaks uninitialized data.
> 
> There has to be a reasonable way to handle these warnings instead of
> rototilling which str*cpy function is used.

Please read the code before commenting. Yes, I know that they are not
equivalent, but in this case the destination strings are all local variables
on the stack used internally only in the functions declared, to be compared
or printed with other NUL-terminated strings. It is pointless to zero out
the rest of the data.

christos

Attachment: signature.asc
Description: Message signed with OpenPGP



Home | Main Index | Thread Index | Old Index