Re: [PATCH v3] scsi: hpsa: Remove deprecated and unnecessary strncpy()

From: Martin K. Petersen
Date: Tue Feb 18 2025 - 20:54:34 EST



Thorsten,

> While replacing strncpy() with strscpy(), Bart Van Assche pointed out
> that the code occurs inside sysfs write callbacks, which already uses
> NUL-terminated strings. This allows the string to be passed directly to
> sscanf() without requiring a temporary copy.

Applied to 6.15/scsi-staging, thanks!

--
Martin K. Petersen Oracle Linux Engineering