mbox series

[iproute2,0/2] Fix segfault in lib/bpf.c

Message ID cover.1590508215.git.aclaudi@redhat.com
Headers show
Series Fix segfault in lib/bpf.c | expand

Message

Andrea Claudi May 26, 2020, 4:04 p.m. UTC
Jamal reported a segfault in bpf_make_custom_path() when custom pinning is
used. This is caused by commit c0325b06382cb ("bpf: replace snprintf with
asprintf when dealing with long buffers").

As the only goal of that commit is to get rid of a truncation warning when
compiling lib/bpf.c, revert it and fix the warning checking for snprintf
return value

Andrea Claudi (2):
  Revert "bpf: replace snprintf with asprintf when dealing with long
    buffers"
  bpf: Fixes a snprintf truncation warning

 lib/bpf.c | 155 +++++++++++++++---------------------------------------
 1 file changed, 41 insertions(+), 114 deletions(-)