fix potential read past end of buffer in getnameinfo service name lookup