mbox series

[iproute2,v3,0/2] bpf: memory access fixes

Message ID 20200423175857.20180-1-jhs@emojatatu.com
Headers show
Series bpf: memory access fixes | expand

Message

Jamal Hadi Salim April 23, 2020, 5:58 p.m. UTC
From: Jamal Hadi Salim <jhs@mojatatu.com>

Changes from V2:
 1) Dont initialize tmp on stack (Stephen)
 2) Dont look at the return code of snprintf (Dominique)
 3) Set errno to EINVAL instead of returning -EINVAL for consistency (Dominique)

Changes from V1:
 1) use snprintf instead of sprintf and fix corresponding error message.
 Caught-by: Dominique Martinet <asmadeus@codewreck.org>
 2) Fix memory leak and extraneous free() in error path

Jamal Hadi Salim (2):
  bpf: Fix segfault when custom pinning is used
  bpf: Fix mem leak and extraneous free() in error path

 lib/bpf.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)