diff options
author | Justin Stitt <justinstitt@google.com> | 2023-09-25 09:35:54 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2023-10-23 20:02:25 +0300 |
commit | e9d7bd2c8664aa43866c7985d9050a052516c07d (patch) | |
tree | f8970a1517e70b6562beb14df6aeb7c945c233f2 /block | |
parent | ac4149ba7efd6bc327c1e15e812091984f3a16b2 (diff) | |
download | linux-e9d7bd2c8664aa43866c7985d9050a052516c07d.tar.xz |
dm crypt: replace open-coded kmemdup_nul
kzalloc() followed by strncpy() on an expected NUL-terminated string is
just kmemdup_nul(). Let's simplify this code (while also dropping a
deprecated strncpy() call [1]).
Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
Link: https://github.com/KSPP/linux/issues/90
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Justin Stitt <justinstitt@google.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions