Re: [PATCH] wifi: mwifiex: Replace strlcpy with strscpy

From: Kees Cook
Date: Thu Jul 27 2023 - 14:04:48 EST


On Thu, Jul 27, 2023 at 10:30:29AM -0700, Brian Norris wrote:
> On Thu, Jul 27, 2023 at 10:04 AM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
> >
> > On Thu, Jul 27, 2023 at 07:02:31PM +0300, Kalle Valo wrote:
> > > https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git/commit/?id=caf9ead2c7d06fd7aa4cb48bd569ad61db9a0b4a
> >
> > For the patch you linked to -- it's okay to have lost the overflow
> > detection and warning?
>
> It's a fixed constant string being copied into a larger fixed array.
> It really doesn't matter functionality-wise. At best, the error check
> would be useful for human readers or automated tools. So I didn't
> bother complaining one way or another, as it took enough tries for the
> submitter to get things right in the first place.

Gotcha. Thanks!

--
Kees Cook