Re: [PATCH] ACPI: OSI: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Mon, Sep 11, 2023 at 08:36:44PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We know `osi->string` is a NUL-terminated string due to its eventual use > in `acpi_install_interface()` and `acpi_remove_interface()` which expect > a `ac

[PATCH] ACPI: OSI: refactor deprecated strncpy

2023-09-11 Thread Justin Stitt
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. We know `osi->string` is a NUL-terminated string due to its eventual use in `acpi_install_interface()` and `acpi_remove_interface()` which expect a `acpi_string` which has been specifically typedef'd as: | typedef char *ac