Hi Kees,
On Mon, Feb 5, 2024 at 1:36 PM Kees Cook <[email protected]> wrote:
> The ARCH=um build has its own idea about strscpy()'s definition. Adjust
> the callers to remove the redundant sizeof() arguments ahead of treewide
> changes, since it needs a manual adjustment for the newly named
> sized_strscpy() export.
>
> Cc: Richard Weinberger <[email protected]>
> Cc: [email protected]
> Signed-off-by: Kees Cook <[email protected]>
Thanks for your patch!
> --- a/arch/um/include/shared/user.h
> +++ b/arch/um/include/shared/user.h
> @@ -52,7 +52,7 @@ static inline int printk(const char *fmt, ...)
> extern int in_aton(char *str);
> extern size_t strlcat(char *, const char *, size_t);
> extern size_t sized_strscpy(char *, const char *, size_t);
> -#define strscpy(dst, src, size) sized_strscpy(dst, src, size)
> +#define strscpy(dst, src) sized_strscpy(dst, src, sizeof(dst))
(dst), (src)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds