]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
n64cart: use strscpy in n64cart_probe
authorThorsten Blum <thorsten.blum@linux.dev>
Sun, 17 May 2026 17:26:17 +0000 (19:26 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Jun 2026 23:43:32 +0000 (17:43 -0600)
commit3f1eccd37282de91efd0575ee8e212af4bde39b1
tree625d2375b11395f307791c5fc7eb1c88756e28d8
parentaa528cd12ca6e7fda15f855b6d2095fd34d167e0
n64cart: use strscpy in n64cart_probe

strcpy() has been deprecated [1] because it performs no bounds checking
on the destination buffer, which can lead to buffer overflows. While the
current code works correctly, replace strcpy() with the safer strscpy()
to follow secure coding best practices.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260517172617.3954-2-thorsten.blum@linux.dev
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/n64cart.c