On 11 Oct 14:34, Kees Cook wrote:
On Wed, Oct 11, 2023 at 09:29:57PM +, Justin Stitt wrote:
In total, just assigning this version string takes:
(1) strncpy()'s
(5) strlen()'s
(3) strncat()'s
(1) snprintf()'s
(4) max_t()'s
Moreover, `strncpy` is deprecated [1] and `strncat` really shouldn't
On Wed, Oct 11, 2023 at 09:29:57PM +, Justin Stitt wrote:
> In total, just assigning this version string takes:
> (1) strncpy()'s
> (5) strlen()'s
> (3) strncat()'s
> (1) snprintf()'s
> (4) max_t()'s
>
> Moreover, `strncpy` is deprecated [1] and `strncat` really shouldn't be
> used either [2].
In total, just assigning this version string takes:
(1) strncpy()'s
(5) strlen()'s
(3) strncat()'s
(1) snprintf()'s
(4) max_t()'s
Moreover, `strncpy` is deprecated [1] and `strncat` really shouldn't be
used either [2]. With this in mind, let's simply use a single
`snprintf`.
Link:
https://www.ke