Page MenuHomeFreeBSD

Fix non-POSIX-compliant use of getaddrinfo in libfetch
ClosedPublic

Authored by grembo on Sep 23 2015, 2:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 3:49 AM
Unknown Object (File)
Nov 23 2023, 4:00 PM
Unknown Object (File)
Oct 19 2023, 10:11 PM
Unknown Object (File)
Oct 19 2023, 5:36 PM
Unknown Object (File)
Aug 27 2023, 8:43 PM
Unknown Object (File)
Aug 27 2023, 8:42 PM
Unknown Object (File)
Aug 27 2023, 8:41 PM
Unknown Object (File)
Aug 27 2023, 8:29 PM
Subscribers

Details

Summary

Boris Kolpackov brought this to my attention: libfetch uses
getaddrinfo in a non-compliant way, as it assumes that
res will be NULL when getaddrinfo fails. Even this
is true in reality right now, it's neither guaranteed by
POSIX, nor by the getaddrinfo man page. To prevent future
breakage and to be a good citizen, this patch aims
to fix this.

Test Plan

Build.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

grembo retitled this revision from to Fix non-POSIX-compliant use of getaddrinfo in libfetch.
grembo updated this object.
grembo edited the test plan for this revision. (Show Details)
grembo added reviewers: des, bapt.
bapt edited edge metadata.
This revision is now accepted and ready to land.Sep 23 2015, 10:03 PM
This revision was automatically updated to reflect the committed changes.