On Thu, Mar 11, 2021 at 12:15:45AM -0500, Sean Anderson wrote:
> strn(cat|cpy) has a bad habit of not nul-terminating the destination,
> resulting in constructions like
>
> strncpy(foo, bar, sizeof(foo) - 1);
> foo[sizeof(foo) - 1] = '\0';
>
> However, it is very easy to forget about
On Thu, 11 Mar 2021 at 18:16, Sean Anderson wrote:
>
> strn(cat|cpy) has a bad habit of not nul-terminating the destination,
> resulting in constructions like
>
> strncpy(foo, bar, sizeof(foo) - 1);
> foo[sizeof(foo) - 1] = '\0';
>
> However, it is very easy to forget about this be
2 matches
Mail list logo