PATCH: mail/isync: don't crash when using Tunnel

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

PATCH: mail/isync: don't crash when using Tunnel

Caspar Schutijser
Hi,

Below is a patch that I submitted to upstream a while ago (which was
committed). Without the patch, mbsync crashes on OpenBSD when using
the Tunnel option in the configuration file.

Thanks,
Caspar Schutijser


Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/isync/Makefile,v
retrieving revision 1.41
diff -u -p -r1.41 Makefile
--- Makefile 12 Jul 2019 20:47:28 -0000 1.41
+++ Makefile 18 Jan 2020 09:23:04 -0000
@@ -3,6 +3,7 @@
 COMMENT= synchronize IMAP4 and maildir mailboxes
 
 DISTNAME= isync-1.3.1
+REVISION= 0
 
 CATEGORIES= mail
 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=isync/}
Index: patches/patch-src_socket_c
===================================================================
RCS file: patches/patch-src_socket_c
diff -N patches/patch-src_socket_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_socket_c 18 Jan 2020 09:23:04 -0000
@@ -0,0 +1,30 @@
+$OpenBSD$
+
+https://sourceforge.net/p/isync/isync/ci/7607e53d56f9470ee221cd5b644dda829f54b005/
+
+commit 7607e53d56f9470ee221cd5b644dda829f54b005
+Author: Caspar Schutijser <[hidden email]>
+Date:   Sun Aug 18 10:38:48 2019 +0200
+
+    Do not crash when using Tunnel in an IPv6-enabled build
+    
+    socket_connected() is also called on the tunnel pipe.
+    
+    amends 3ceb55310.
+
+Index: src/socket.c
+--- src/socket.c.orig
++++ src/socket.c
+@@ -545,8 +545,10 @@ static void
+ socket_connected( conn_t *conn )
+ {
+ #ifdef HAVE_IPV6
+- freeaddrinfo( conn->addrs );
+- conn->addrs = 0;
++ if (conn->addrs) {
++ freeaddrinfo( conn->addrs );
++ conn->addrs = 0;
++ }
+ #endif
+ conf_notifier( &conn->notify, 0, POLLIN );
+ socket_expect_read( conn, 0 );

Reply | Threaded
Open this post in threaded view
|

Re: PATCH: mail/isync: don't crash when using Tunnel

Klemens Nanni-2
On Sat, Jan 18, 2020 at 10:31:56AM +0100, Caspar Schutijser wrote:
> Below is a patch that I submitted to upstream a while ago (which was
> committed). Without the patch, mbsync crashes on OpenBSD when using
> the Tunnel option in the configuration file.
Committed, thanks.