Re: [PATCH] ACPICA: Replace deprecated strncpy() with strscpy()

From: Krzysztof Kozlowski
Date: Mon Mar 17 2025 - 04:19:40 EST


On 17/03/2025 07:38, feng.wei8@xxxxxxxxxx wrote:
> diff --git a/drivers/acpi/acpica/utnonansi.c b/drivers/acpi/acpica/utnonansi.c
> index ff0802ace19b..1da9b8246011 100644
> --- a/drivers/acpi/acpica/utnonansi.c
> +++ b/drivers/acpi/acpica/utnonansi.c
> @@ -168,8 +168,7 @@ void acpi_ut_safe_strncpy(char *dest, char *source, acpi_size dest_size)
> {
> /* Always terminate destination string */
>
> - strncpy(dest, source, dest_size);
> - dest[dest_size - 1] = 0;
> + strscpy(dest, source, dest_size);

What is the point of this function now?

Can ZTE slow down and address the feedback first?

Best regards,
Krzysztof