Re: [PATCH] drbd: Replace deprecated strcpy with strscpy

From: Christoph Böhmwalder

Date: Thu Feb 19 2026 - 09:36:28 EST


On 1/12/26 18:04, Thorsten Blum wrote:
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(). No functional changes.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy [1]
Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
---
drivers/block/drbd/drbd_main.c | 14 +++++++++-----
drivers/block/drbd/drbd_receiver.c | 4 ++--
2 files changed, 11 insertions(+), 7 deletions(-)

Looks good, thanks.

Reviewed-by: Christoph Böhmwalder <christoph.boehmwalder@xxxxxxxxxx>