drivers/block/rbd: Use strscpy() to copy strings into arrays
authorDavid Laight <david.laight.linux@gmail.com>
Sat, 6 Jun 2026 20:27:44 +0000 (21:27 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 8 Jun 2026 13:45:56 +0000 (07:45 -0600)
commit5ef1b0194b382fafe5023b5b014e4db3b948ee15
tree762b11bb8c574f2fb612b4b8899544fe24accf4c
parent2dc0bfd2fe355fb930de63c2f2eb8ced8570c579
drivers/block/rbd: Use strscpy() to copy strings into arrays

Replacing strcpy() with strscpy() ensures than overflow of the target
buffer cannot happen.

Signed-off-by: David Laight <david.laight.linux@gmail.com>
Reviewed-by: Alex Elder <elder@riscstar.com>
Link: https://patch.msgid.link/20260606202744.5113-5-david.laight.linux@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rbd.c