RE: RE: [PATCH bpf-next] selftests/bpf: Fix strncpy() fortify warning

From: David Laight
Date: Tue Nov 01 2022 - 05:27:19 EST


From: Rong Tao <rtoax@xxxxxxxxxxx>
> Sent: 01 November 2022 09:25
>
> Can we just use the first patch?
> https://lore.kernel.org/lkml/tencent_EE3E19F80ACD66955D26A878BC768CFA210A@xxxxxx/

IIRC strlcpy() does the copy you want.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)