ecryptfs: Replace strcpy with strscpy in ecryptfs_set_default_crypt_stat_vals
authorThorsten Blum <thorsten.blum@linux.dev>
Sat, 13 Dec 2025 11:04:50 +0000 (12:04 +0100)
committerTyler Hicks <code@tyhicks.com>
Tue, 23 Dec 2025 21:23:23 +0000 (15:23 -0600)
commit3bdc6cace25c3c7adfc073bb763bb52c9d1282c8
treec089f6bc2dacafa487c7664d8d4f62ea670ed319
parent5c31c9bf9e2ff0d6c065ff7f2ccf8a1e95ddbb49
ecryptfs: Replace strcpy with strscpy in ecryptfs_set_default_crypt_stat_vals

strcpy() has been deprecated [1] because it performs no bounds checking
on the destination buffer, which can lead to buffer overflows. Replace
it with the safer strscpy().

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Tyler Hicks <code@tyhicks.com>
fs/ecryptfs/crypto.c