Re: [PATCH v3 01/13] tools lib bpf: Check return value of strdup when reading map names

2015-11-30 Thread Namhyung Kim
On Mon, Nov 30, 2015 at 07:32:01AM +, Wang Nan wrote: > Commit 561bbccac72d08babafaa33fd7fa9100ec4c9fb6 ("tools lib bpf: > Extract and collect map names from BPF object file") forgets checking > return value of strdup(). This patch fixes it. It also checks names > pointer before strcmp() for sa

[PATCH v3 01/13] tools lib bpf: Check return value of strdup when reading map names

2015-11-29 Thread Wang Nan
Commit 561bbccac72d08babafaa33fd7fa9100ec4c9fb6 ("tools lib bpf: Extract and collect map names from BPF object file") forgets checking return value of strdup(). This patch fixes it. It also checks names pointer before strcmp() for safty. Reported-by: Namhyung Kim Signed-off-by: Wang Nan Cc: Namh