Hi Steven, I was about to submit the same patch when I found this one from 2023.
On 24. Jan 2023, at 18:17, Steven Rostedt wrote: > So the above will *always* return -E2BIG *and* not end buf[] with '\0' as > if strscpy() returns -E2BIG, then buf[] is not guaranteed to be > NUL-terminated. The return value is not used and the strscpy() documentation in linux/string.h says: "The destination @dst buffer is always NUL terminated, unless it's zero- sized." and "Preferred to strncpy() since it always returns a valid string, ..." Has strscpy() changed since 2023 or could this patch be revisited? I saw that Justin also made an effort in September 2024 [1] to revisit it and to remove the deprecated strncpy() here. > NACK! > > -- Steve Thanks, Thorsten [1] https://lore.kernel.org/r/yhv3rzg6vhgwage27cyvg72t4vwf5x3tdtj3zjipryzvz3u55x@c33q753uxyi3/ Cc: [email protected]
