Get socket options: bug fix: remove trailing zero in string results