Hi Miod,

On Sun, Dec 25, 2022 at 05:21:50PM +0000, Miod Vallat wrote:
> In other words,
>       copystr(src, dst, dstsiz, len)
> is equivalent to:
>       if (strlcpy(dst, src, dstsiz) >= dstsiz)
>               return ENAMETOOLONG;
>       if (len != NULL)
>               *len = strlen(dst);

This should be *len = strlen(dst)+1 as copystr includes the terminating 0x00
in the length count.

It doesn't matter for the current diff, but it will matter if you replace the
last remaining use of copystr which does use the returned length value.

Reply via email to