[PATCH] drbd: Replace deprecated strcpy with strscpy
Christoph Böhmwalder
christoph.boehmwalder at linbit.com
Thu Feb 19 15:32:23 CET 2026
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 at linux.dev>
> ---
> 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 at linbit.com>
More information about the drbd-dev
mailing list