Re: [bpf PATCH] bpf: fix uninitialized variable in bpf tools

2018-04-26 Thread Daniel Borkmann
On 04/26/2018 12:08 AM, John Fastabend wrote: > Here the variable cont is used as the saved_pointer for a call to > strtok_r(). It is safe to use the value uninitialized in this > context however and the later reference is only ever used if > the strtok_r is successful. But, 'gcc-5' at least

[bpf PATCH] bpf: fix uninitialized variable in bpf tools

2018-04-25 Thread John Fastabend
Here the variable cont is used as the saved_pointer for a call to strtok_r(). It is safe to use the value uninitialized in this context however and the later reference is only ever used if the strtok_r is successful. But, 'gcc-5' at least doesn't have all this knowledge so initialize cont to NULL.