On Mon, Oct 23, 2023 at 07:14:49PM +, Justin Stitt wrote:
> Let's move away from using strncpy() as it is deprecated [1].
>
> Instead use strtomem() as `e.id` is already marked as nonstring:
> | char id[4] __nonstring;
>
> We don't need strtomem_pad() because `e` is already memset to 0
On Tue, Oct 24, 2023 at 04:46:04PM -0700, Kees Cook wrote:
> > Instead use strtomem() as `e.id` is already marked as nonstring:
> > | char id[4] __nonstring;
>
> I'm surprised the compiler didn't complain about this -- I thought that
> was the point of the __nonstring attribute: to diagnose
On Mon, Oct 23, 2023 at 07:14:49PM +, Justin Stitt wrote:
> Let's move away from using strncpy() as it is deprecated [1].
>
> Instead use strtomem() as `e.id` is already marked as nonstring:
> | char id[4] __nonstring;
I'm surprised the compiler didn't complain about this -- I thought t
Let's move away from using strncpy() as it is deprecated [1].
Instead use strtomem() as `e.id` is already marked as nonstring:
| char id[4] __nonstring;
We don't need strtomem_pad() because `e` is already memset to 0 --
rendering any additional NUL-padding useless.
Link:
https://www.kerne