Re: [iproute2 2/2] ss: fix NULL pointer access when parsing unix sockets with oldformat

2018-01-06 Thread Antonio Quartulli
Hi, On 07/01/18 03:28, Stefano Brivio wrote: > On Sun, 7 Jan 2018 02:31:50 +0800 > Antonio Quartulli wrote: > >> When parsing and printing the unix sockets in unix_show(), >> if the oldformat is detected, the peer_name member of the sockstat >> object is left uninitialized (NULL). > > Luckily,

Re: [iproute2 2/2] ss: fix NULL pointer access when parsing unix sockets with oldformat

2018-01-06 Thread Stefano Brivio
On Sun, 7 Jan 2018 02:31:50 +0800 Antonio Quartulli wrote: > When parsing and printing the unix sockets in unix_show(), > if the oldformat is detected, the peer_name member of the sockstat > object is left uninitialized (NULL). Luckily, it is initialized. I'd rather say: [...]

[iproute2 2/2] ss: fix NULL pointer access when parsing unix sockets with oldformat

2018-01-06 Thread Antonio Quartulli
When parsing and printing the unix sockets in unix_show(), if the oldformat is detected, the peer_name member of the sockstat object is left uninitialized (NULL). For this reason, if a filter has been specified on the command line, a strcmp() will crash when trying to access it. Avoid crash by che