https://bugzilla.samba.org/show_bug.cgi?id=8355
Summary: Use pointer after freeaddrinfo()
Product: rsync
Version: 3.0.8
Platform: All
OS/Version: All
Status: NEW
Severity: critical
Priority: P5
Component: core
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]
Build and install rsync 3.0.8 then try to connect unavaliable host and you've
got segmentation fault.
$ rsync rsync://10.0.0.1
rsync: failed to connect to 10.0.0.1 (10.0.0.1): Operation timed out (60)
Segmentation fault: 11
There's an error in open_socket_out() function in socket.c. It's need to call
freeaddrinfo() in the end of the function. Like this:
--- socket.c.orig 2011-08-05 23:55:06.000000000 +0400
+++ socket.c 2011-08-05 23:55:17.000000000 +0400
@@ -299,7 +299,6 @@
}
break;
}
- freeaddrinfo(res0);
if (s < 0) {
char buf[2048];
@@ -313,6 +312,7 @@
s = -1;
}
+ freeaddrinfo(res0);
free(errnos);
return s;
but there is an another error over calling inet_ntop().
Full patch is in attachment.
--
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html