This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nss/20612] getaddrinfo() returns EAI_SYSTEM depending on uninitialized value


https://sourceware.org/bugzilla/show_bug.cgi?id=20612

--- Comment #2 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Martin Panter from comment #1)
> enum nss_status _nss_wtf_gethostbyname2_r(const char *name, int af,
>         struct hostent *he, char *buffer, size_t buflen, int *h_errnop) {


That function definition is incorrect, it should be:

enum nss_status
_nss_wtf_gethostbyname2_r (const char *name, int af, struct hostent *host,
                           char *buffer, size_t buflen, int *errnop,
                           int *h_errnop)

In effect, you are never updating *h_errnop (only *errnop), so the valgrind
warning is appropriate here.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]