Re: [PATCH] um,ethertap: refactor deprecated strncpy

2023-09-14 Thread Kees Cook
On Tue, Sep 12, 2023 at 01:12:35PM -0700, Justin Stitt wrote: > On Tue, Sep 12, 2023 at 12:36 AM Geert Uytterhoeven > wrote: > > > > Hi Justin, > > > > Thanks for your patch! > > > > On Mon, Sep 11, 2023 at 7:53 PM Justin Stitt wrote: > > > `strncpy` is deprecated for use on NUL-terminated destin

Re: [PATCH] um,ethertap: refactor deprecated strncpy

2023-09-12 Thread Justin Stitt
On Tue, Sep 12, 2023 at 12:36 AM Geert Uytterhoeven wrote: > > Hi Justin, > > Thanks for your patch! > > On Mon, Sep 11, 2023 at 7:53 PM Justin Stitt wrote: > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > > > `gate_buf` should always be NUL-terminated and does n

Re: [PATCH] um,ethertap: refactor deprecated strncpy

2023-09-12 Thread Geert Uytterhoeven
Hi Justin, Thanks for your patch! On Mon, Sep 11, 2023 at 7:53 PM Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > `gate_buf` should always be NUL-terminated and does not require > NUL-padding. It is used as a string arg inside an argv array gi

[PATCH] um,ethertap: refactor deprecated strncpy

2023-09-11 Thread Justin Stitt
`strncpy` is deprecated for use on NUL-terminated destination strings [1]. `gate_buf` should always be NUL-terminated and does not require NUL-padding. It is used as a string arg inside an argv array given to `run_helper()`. Due to this, let's use `strscpy` as it guarantees NUL-terminated on the d