• Mike Saal's avatar
    ss format bug · 4fcfb6bc
    Mike Saal authored
    Hi:
    
    I found a formatting bug in the 4.1.1 ss command. The following line was
    incorrectly output due to passing a negative length to printf() when
    displaying the local address. In this instance hostapd does a "bind to
    device" on cdreth0 and then does a udp "in address any" port 67 bind.
    Please note the whitespace between the '*' and ' %cdreth0:67'
    
        'udp UNCONN 0 0 ** %cdreth0:67* *:* users:(("hostapd",pid=19241,fd=5))'
    
    Attached is my patch for the bug fix, it might be prudent to add more
    guard code looking for negative length format codes.
    
    Sincerely, Mike
    4fcfb6bc
ss.c 87.3 KB