[mutt] 01/01: upstream/644992-ipv6-literal.patch: to parse ipv6 literal addresses properly (Closes: 644992).

Antonio Radici antonio at moszumanska.debian.org
Sun Sep 4 20:16:54 UTC 2016


This is an automated email from the git hooks/post-receive script.

antonio pushed a commit to branch master
in repository mutt.

commit dcba0c0015769488a1051b91d22cf8ba398dddce
Author: Antonio Radici <antonio at debian.org>
Date:   Sun Sep 4 21:16:49 2016 +0100

    upstream/644992-ipv6-literal.patch: to parse ipv6 literal addresses properly (Closes: 644992).
---
 debian/changelog                                  |  2 +
 debian/patches/series                             |  1 +
 debian/patches/upstream/644992-ipv6-literal.patch | 68 +++++++++++++++++++++++
 3 files changed, 71 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 59d715f..dff5648 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ mutt (1.7.0-2) UNRELEASED; urgency=medium
       message scoring, as upstream requested (Closes: 819196).
     + upstream/757141-date-format-length.patch: allow more space for date_format
       (Closes: 757141).
+    + upstream/644992-ipv6-literal.patch: to parse ipv6 literal addresses
+      properly (Closes: 644992).
 
  -- Antonio Radici <antonio at debian.org>  Mon, 29 Aug 2016 21:27:08 +0100
 
diff --git a/debian/patches/series b/debian/patches/series
index dd69a57..425826f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -22,3 +22,4 @@ upstream/569038-interrupt-socket-read-write.patch
 upstream/833192-preserve-messageid-for-postponed-emails.patch
 upstream/819196-disable-X-in-message-scoring.patch
 upstream/757141-date-format-length.patch
+upstream/644992-ipv6-literal.patch
diff --git a/debian/patches/upstream/644992-ipv6-literal.patch b/debian/patches/upstream/644992-ipv6-literal.patch
new file mode 100644
index 0000000..9273d19
--- /dev/null
+++ b/debian/patches/upstream/644992-ipv6-literal.patch
@@ -0,0 +1,68 @@
+Allow parsing of URIs with IPv6 literal addresses (RFCs 2732 and 3986)
+
+Patch created by by Evgeni Golov <evgeni at golov.de>
+
+Debian bug: http://bugs.debian.org/644992
+Mutt bug: http://bugs.mutt.org/3681
+
+--- a/mutt_socket.c
++++ b/mutt_socket.c
+@@ -456,6 +456,8 @@
+   int fd;
+ 
+   char *host_idna = NULL;
++  char *host = NULL;
++  char *tmp = NULL;
+   
+ #ifdef HAVE_GETADDRINFO
+ /* --- IPv4/6 --- */
+@@ -488,10 +490,18 @@
+   host_idna = conn->account.host;
+ # endif
+ 
++  if ((host = strchr(host_idna, '[')) && (tmp = strrchr(host_idna, ']')))
++  {
++      *tmp = '\0';
++      host = strchr(host_idna, '[')+1;
++  }
++  else
++    host = host_idna;
++
+   if (!option(OPTNOCURSES))
+     mutt_message (_("Looking up %s..."), conn->account.host);
+   
+-  rc = getaddrinfo (host_idna, port, &hints, &res);
++  rc = getaddrinfo (host, port, &hints, &res);
+ 
+ # ifdef HAVE_LIBIDN
+   FREE (&host_idna);
+--- a/url.c
++++ b/url.c
+@@ -116,7 +116,7 @@
+  *   means no port given. */
+ static int ciss_parse_userhost (ciss_url_t *ciss, char *src)
+ {
+-  char *t, *p;
++  char *t, *p, *v;
+ 
+   ciss->user = NULL;
+   ciss->pass = NULL;
+@@ -152,7 +152,17 @@
+   else
+     t = src;
+ 
+-  if ((p = strchr (t, ':')))
++  if ((v = strchr (t, '[')))
++  {
++    if (!(v = strrchr (v, ']')))
++    {
++      v = t;
++    }
++  }
++  else
++    v = t;
++
++  if ((p = strchr (v, ':')))
+   {
+     int t;
+     *p++ = '\0';

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mutt/mutt.git



More information about the pkg-mutt-commits mailing list