diff options
author | Justin Stitt <justinstitt@google.com> | 2023-09-25 06:35:54 +0000 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2023-10-23 13:02:25 -0400 |
commit | e9d7bd2c8664aa43866c7985d9050a052516c07d (patch) | |
tree | f8970a1517e70b6562beb14df6aeb7c945c233f2 /drivers/md/dm-target.c | |
parent | ac4149ba7efd6bc327c1e15e812091984f3a16b2 (diff) | |
download | linux-e9d7bd2c8664aa43866c7985d9050a052516c07d.tar.gz linux-e9d7bd2c8664aa43866c7985d9050a052516c07d.tar.bz2 linux-e9d7bd2c8664aa43866c7985d9050a052516c07d.zip |
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 'drivers/md/dm-target.c')
0 files changed, 0 insertions, 0 deletions