[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: unsafe strlcpy
First of all:
Le 08/02/2020 à 15:54, Maxime Villard a écrit :
[I am not subscribed to this list, so if you want to answer, make sure to CC me]
Neither strlcpy nor copystr is safe
copystr stops reading both buffers if the limit (size) is reached, therefore
it would have been safe to use in the cases I mentioned, contrary to strlcpy.
in netbsd32_ioctl it should just be replaced with memcpy().
Actually, here, yes.
The correct way is to safely parse the input, e.g. with strnvisx.
Yeah, but my point was, more importantly, the printfs should be under debug
only or at the very least rate-limited.
Main Index |
Thread Index |