getservbyport_r: fix wrong result if getnameinfo fails with EAI_OVERFLOW
authorAlexey Izbyshev <izbyshev@ispras.ru>
Mon, 27 Feb 2023 20:33:08 +0000 (23:33 +0300)
committerRich Felker <dalias@aerifal.cx>
Tue, 28 Feb 2023 17:01:34 +0000 (12:01 -0500)
commitb1dfb734a45d4f74c7a24c5f07d37f7e74451802
tree98615373c1a7645e9962d1eb096bee0d36f770cd
parent595416b11dfbc82d40a59d0edd7e3b04ba7a2d6d
getservbyport_r: fix wrong result if getnameinfo fails with EAI_OVERFLOW

EAI_OVERFLOW should be propagated as ERANGE to inform the caller about
the need to expand the buffer.
src/network/getservbyport_r.c