string: Allow 2-argument strscpy_pad()
authorKees Cook <keescook@chromium.org>
Fri, 2 Feb 2024 11:40:23 +0000 (03:40 -0800)
committerKees Cook <keescook@chromium.org>
Wed, 21 Feb 2024 04:47:32 +0000 (20:47 -0800)
commit8366d124ec937c3815212c00daf00b687eb27969
tree76906a05338f7551fe4e42d8d8d5aac6925334b6
parente6584c3964f2ff76a9fb5a701e4a59997b35e547
string: Allow 2-argument strscpy_pad()

Similar to strscpy(), update strscpy_pad()'s 3rd argument to be
optional when the destination is a compile-time known size array.

Cc: Andy Shevchenko <andy@kernel.org>
Cc: <linux-hardening@vger.kernel.org>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
include/linux/string.h