[Bug 8355] Use pointer after freeaddrinfo()
samba-bugs at samba.org
samba-bugs at samba.org
Sat Aug 6 06:36:18 MDT 2011
https://bugzilla.samba.org/show_bug.cgi?id=8355
Andrey Zonov <andrey at zonov.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #3 from Andrey Zonov <andrey at zonov.org> 2011-08-06 12:36:18 UTC ---
(In reply to comment #2)
> This was fixed in git back on July 11. Thanks, though!
I think I found another bug over there. Please, inspect this patch:
diff --git a/socket.c b/socket.c
index 0f596e0..84f9b0c 100644
--- a/socket.c
+++ b/socket.c
@@ -303,7 +303,7 @@ int open_socket_out(char *host, int port, const char
*bind_addr,
}
if (DEBUG_GTE(CONNECT, 2)) {
char buf[2048];
- if ((error = getnameinfo(res->ai_addr, res->ai_addrlen,
buf, sizeof buf, NULL, 0, NI_NUMERICHOST) != 0))
+ if ((error = getnameinfo(res->ai_addr, res->ai_addrlen,
buf, sizeof buf, NULL, 0, NI_NUMERICHOST)) != 0)
snprintf(buf, sizeof buf, "*getnameinfo
failure: %s*", gai_strerror(error));
rprintf(FINFO, "Connected to %s (%s)\n", h, buf);
}
@@ -315,7 +315,7 @@ int open_socket_out(char *host, int port, const char
*bind_addr,
for (res = res0, j = 0; res; res = res->ai_next, j++) {
if (errnos[j] == 0)
continue;
- if ((error = getnameinfo(res->ai_addr, res->ai_addrlen,
buf, sizeof buf, NULL, 0, NI_NUMERICHOST) != 0))
+ if ((error = getnameinfo(res->ai_addr, res->ai_addrlen,
buf, sizeof buf, NULL, 0, NI_NUMERICHOST)) != 0)
snprintf(buf, sizeof buf, "*getnameinfo
failure: %s*", gai_strerror(error));
rsyserr(FERROR, errnos[j], "failed to connect to %s
(%s)", h, buf);
}
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the rsync
mailing list