Re: [PATCH] soc: qcom: cmd-db: replace deprecated strncpy with memcpy

From: Kees Cook
Date: Mon Mar 18 2024 - 19:50:05 EST


On Mon, Mar 18, 2024 at 03:47:38PM -0700, Justin Stitt wrote:
> Gotcha, I was operating under the assumption that we needed to know
> the size of id at compile time. Apparently __builtin_object_size(_, 1)
> will return SIZE_T_MAX if we don't know the size of something. Sending
> a v2.

Yeah, it only requires to know the compile-time size of the destination
buffer.

--
Kees Cook