diff options
author | Florian Weimer <fweimer@redhat.com> | 2016-05-04 14:45:17 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2016-05-04 14:48:01 +0200 |
commit | 066746783d6c6c0f61b39c741177e24a9b398a20 (patch) | |
tree | 4f431d48d92fc5e5c9a0cf1ac2289f4dcf9a2650 /ChangeLog | |
parent | 1c3490d4b29fc5b3f30dd6b13082046aee94443d (diff) | |
download | glibc-066746783d6c6c0f61b39c741177e24a9b398a20.zip glibc-066746783d6c6c0f61b39c741177e24a9b398a20.tar.gz glibc-066746783d6c6c0f61b39c741177e24a9b398a20.tar.bz2 |
getnameinfo: Return EAI_OVERFLOW in more cases [BZ #19787]
The AF_LOCAL and AF_INET/AF_INET6 non-numerci service conversion
did not return EAI_OVERFLOW if the supplied buffer was too small,
silently returning truncated data. In the AF_INET/AF_INET6
numeric cases, the snprintf return value checking was incorrect.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1,5 +1,17 @@ 2016-05-04 Florian Weimer <fweimer@redhat.com> + [BZ #19787] + * inet/getnameinfo.c (check_sprintf_result): New function. + (CHECKED_SNPRINTF): New macro. + (gni_host_inet_numeric): Use CHECKED_SNPRINTF to write the scope + to the host buffer. + (gni_host_local): Use checked_copy to copy the host name. + (gni_serv_inet): Use CHECKED_SNPRINTF to write the service name. + (gni_serv_local): Use checked_copy to copy the service name. + (getnameinfo): Remove unnecessary truncation of result buffers. + +2016-05-04 Florian Weimer <fweimer@redhat.com> + * inet/getnameinfo.c (gni_host_inet_numeric): Return EAI_OVERFLOW in case of inet_ntop failure. |