mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-28 16:54:57 -04:00
In preparation for removing the strlcat() API[1], replace its uses in string-stream. string_stream_vadd() appends at most a single newline into space that was explicitly reserved when the fragment was sized, so a bounded copy at the end of the string is enough. The return value of strscpy() keeps the length accounting unchanged. string_stream_get_string() concatenates a variable number of fragments into a buffer sized to hold them all, which is what seq_buf is for. Link: https://lore.kernel.org/r/akenPvVk1xr_-480@dev Link: https://github.com/KSPP/linux/issues/370 [1] Signed-off-by: Ian Bridges <icb@fastmail.org> Reviewed-by: David Gow <david@davidgow.net> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>