Re: [PATCH] ALSA: mixer_oss: Replace deprecated strcpy() with strscpy()

From: Al Viro
Date: Wed Jun 18 2025 - 18:49:40 EST


On Thu, Jun 19, 2025 at 12:36:29AM +0200, Thorsten Blum wrote:
> strcpy() is deprecated; use strscpy() instead.
>
> No functional changes intended.

Have you actually read the damn thing? Seriously, look at the uses
of 'str' downstream. The only thing it is ever passed to is strcmp().

In other words, why do we need to copy it anywhere? What's wrong with
having char *str instead of that array and replacing strcpy() with
plain and simple pointer assignment?