Re: [PATCH] platform/x86: thinkpad_acpi: replace deprecated strncpy with memcpy

From: Ilpo Järvinen
Date: Mon Oct 23 2023 - 10:03:04 EST


On Fri, 20 Oct 2023 17:52:43 +0000, Justin Stitt wrote:

> strncpy() is deprecated for use on NUL-terminated destination strings
> [1] and as such we should prefer more robust and less ambiguous
> interfaces.
>
> We expect ec_fw_string to be NUL-terminated based on its use with format
> strings in thinkpad_acpi.c:
> 11241 | pr_notice("ThinkPad firmware release %s doesn't match the known patterns\n",
> 11242 | ec_fw_string);
>
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo branch. Note it will show up in the public
platform-drivers-x86/review-ilpo branch only once I've pushed my
local branch there, which might take a while.

Once I've run some tests on the review-ilpo branch the patches
there will be added to the platform-drivers-x86/for-next branch
and eventually will be included in the pdx86 pull-request to
Linus for the next merge-window.

The list of commits applied:
[1/1] platform/x86: thinkpad_acpi: replace deprecated strncpy with memcpy
commit: 942a4a61b64e182d756a1a5776aa500d3b3d862f

--
i.