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

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/main.c