[PKT_SCHED]: Add rtattr_strlcpy, use it where appropriate
Add rtattr_strlcpy to handle unterminated strings. The destination is nulled out entirely to avoid possible leaks when dumping. The return value can be checked for >= size to detect truncated strings. Currently strings equal to the size of the destination are accepted everywhere even if not null-terminated. Sometimes they are silently truncated, sometimes the unterminated string is used. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing
Please register or sign in to comment