On Tue, Dec 14, 2021 at 3:21 PM Andrii Nakryiko <andrii@xxxxxxxxxx> wrote: > > Fix possible read beyond ELF "license" data section if the license > string is not properly zero-terminated. Use the fact that libbpf_strlcpy > never accesses the (N-1)st byte of the source string because it's > replaced with '\0' anyways. > > If this happens, it's a violation of contract between libbpf and a user, > but not handling this more robustly upsets CIFuzz, so given the fix is > trivial, let's fix the potential issue. > > Fixes: 9fc205b413b3 ("libbpf: Add sane strncpy alternative and use it internally") > Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx> Applied. Thanks