]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ecryptfs: Replace memcpy + NUL termination in ecryptfs_copy_filename
authorThorsten Blum <thorsten.blum@linux.dev>
Sun, 11 Jan 2026 13:12:58 +0000 (14:12 +0100)
committerTyler Hicks <code@tyhicks.com>
Tue, 13 Jan 2026 02:21:27 +0000 (20:21 -0600)
commit99853d9daef240a45e161d0e33487cda4810b999
tree381960a1a0c054316048b6c020d574d3477943a1
parent6ba673331340dabcff4a3ca91cc67761ba74c518
ecryptfs: Replace memcpy + NUL termination in ecryptfs_copy_filename

Use kmemdup_nul() to copy 'name' instead of using memcpy() followed by a
manual NUL termination.  Remove the local return variable and the goto
label to simplify the code.  No functional changes.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Tyler Hicks <code@tyhicks.com>
Signed-off-by: Tyler Hicks <code@tyhicks.com>
fs/ecryptfs/crypto.c