Update to 1.2.5.1. This is the latest version on mutt's "stable"

branch, and fixes a security hole (which was patched in the last commit
to the port).

PR:		33610
Submitted by:	Udo Schweigert <udo.schweigert@siemens.com>
Approved by:	silence from maintainer
This commit is contained in:
Jim Mock 2002-01-13 00:33:00 +00:00
parent 83887178a5
commit 89c786c03b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=53001
6 changed files with 8 additions and 260 deletions

View file

@ -7,10 +7,9 @@
#
PORTNAME= mutt
PORTVERSION= 1.2.5
PORTREVISION= 1
PORTVERSION= 1.2.5.1
CATEGORIES+= mail
MASTER_SITES= ftp://ftp.guug.de/pub/mutt/ \
MASTER_SITES= ftp://ftp.mutt.org/pub/mutt/ \
ftp://ftp.uib.no/pub/mutt/ \
ftp://pgp.rasip.fer.hr/pub/mutt/international/ \
ftp://ftp.gbnet.net/pub/mutt-international/ \
@ -18,7 +17,6 @@ MASTER_SITES= ftp://ftp.guug.de/pub/mutt/ \
ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/mutt-international/ \
ftp://ftp.gwdg.de/pub/unix/mail/mutt/international/ \
ftp://ftp.iks-jena.de/pub/mitarb/lutz/crypt/software/pgp/mutt/
DISTNAME= ${PORTNAME}-${PORTVERSION}i
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} charmaps-0.0.tar.gz
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}

View file

@ -1,3 +1,3 @@
MD5 (mutt/mutt-1.2.5i.tar.gz) = 0ba5367059abdd55daceb82dce6be42f
MD5 (mutt/mutt-1.2.5.1.tar.gz) = 2ede4b04ad0a4c8ecdbaa322f416a8c6
MD5 (mutt/charmaps-0.0.tar.gz) = e79b9f57da1f6a4d0a63ff60a4ef7da8
MD5 (mutt/patch-1.2.5.rr.compressed.1.gz) = 95bec646c20ef1d7f5680302dce2783b
MD5 (mutt/patch-1.2.5.1.rr.compressed.1.gz) = 2bb00d62cc7740624c45b01878d24bc7

View file

@ -1,124 +0,0 @@
diff -u -r2.9.2.1 rfc822.c
--- rfc822.c 2000/06/22 10:54:58 2.9.2.1
+++ rfc822.c 2002/01/01 10:24:05
@@ -33,6 +33,12 @@
#include "rfc822.h"
#endif
+#define terminate_string(a, b, c) do { if ((b) < (c)) a[(b)] = 0; else \
+ a[(c)] = 0; } while (0)
+
+#define terminate_buffer(a, b) terminate_string(a, b, sizeof (a) - 1)
+
+
const char RFC822Specials[] = "@.,:;<>[]\\\"()";
#define is_special(x) strchr(RFC822Specials,x)
@@ -227,12 +233,12 @@
return NULL;
}
- token[*tokenlen] = 0;
+ terminate_string (token, *tokenlen, tokenmax);
addr->mailbox = safe_strdup (token);
if (*commentlen && !addr->personal)
{
- comment[*commentlen] = 0;
+ terminate_string (comment, *commentlen, commentmax);
addr->personal = safe_strdup (comment);
}
@@ -320,9 +326,6 @@
*last = cur;
}
-#define terminate_string(a, b) do { if (b < sizeof(a) - 1) a[b] = 0; else \
- a[sizeof(a) - 1] = 0; } while (0)
-
ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s)
{
const char *begin, *ps;
@@ -344,12 +347,12 @@
{
if (phraselen)
{
- terminate_string (phrase, phraselen);
+ terminate_buffer (phrase, phraselen);
add_addrspec (&top, &last, phrase, comment, &commentlen, sizeof (comment) - 1);
}
else if (commentlen && last && !last->personal)
{
- terminate_string (comment, commentlen);
+ terminate_buffer (comment, commentlen);
last->personal = safe_strdup (comment);
}
@@ -377,7 +380,7 @@
else if (*s == ':')
{
cur = rfc822_new_address ();
- terminate_string (phrase, phraselen);
+ terminate_buffer (phrase, phraselen);
cur->mailbox = safe_strdup (phrase);
cur->group = 1;
@@ -401,12 +404,12 @@
{
if (phraselen)
{
- terminate_string (phrase, phraselen);
+ terminate_buffer (phrase, phraselen);
add_addrspec (&top, &last, phrase, comment, &commentlen, sizeof (comment) - 1);
}
else if (commentlen && last && !last->personal)
{
- terminate_string (phrase, phraselen);
+ terminate_buffer (phrase, phraselen);
last->personal = safe_strdup (comment);
}
#ifdef EXACT_ADDRESS
@@ -430,7 +433,7 @@
}
else if (*s == '<')
{
- terminate_string (phrase, phraselen);
+ terminate_buffer (phrase, phraselen);
cur = rfc822_new_address ();
if (phraselen)
{
@@ -459,7 +462,7 @@
}
else
{
- if (phraselen && phraselen < sizeof (phrase) - 1)
+ if (phraselen && phraselen < sizeof (phrase) - 1 && *s != '.')
phrase[phraselen++] = ' ';
if ((ps = next_token (s, phrase, &phraselen, sizeof (phrase) - 1)) == NULL)
{
@@ -473,13 +476,13 @@
if (phraselen)
{
- terminate_string (phrase, phraselen);
- terminate_string (comment, commentlen);
+ terminate_buffer (phrase, phraselen);
+ terminate_buffer (comment, commentlen);
add_addrspec (&top, &last, phrase, comment, &commentlen, sizeof (comment) - 1);
}
else if (commentlen && last && !last->personal)
{
- terminate_string (comment, commentlen);
+ terminate_buffer (comment, commentlen);
last->personal = safe_strdup (comment);
}
#ifdef EXACT_ADDRESS
@@ -498,7 +501,7 @@
if (!addr->group && addr->mailbox && strchr (addr->mailbox, '@') == NULL)
{
p = safe_malloc (mutt_strlen (addr->mailbox) + mutt_strlen (host) + 2);
- sprintf (p, "%s@%s", addr->mailbox, host);
+ sprintf (p, "%s@%s", addr->mailbox, host); /* __SPRINTF_CHECKED__ */
safe_free ((void **) &addr->mailbox);
addr->mailbox = p;
}

View file

@ -7,10 +7,9 @@
#
PORTNAME= mutt
PORTVERSION= 1.2.5
PORTREVISION= 1
PORTVERSION= 1.2.5.1
CATEGORIES+= mail
MASTER_SITES= ftp://ftp.guug.de/pub/mutt/ \
MASTER_SITES= ftp://ftp.mutt.org/pub/mutt/ \
ftp://ftp.uib.no/pub/mutt/ \
ftp://pgp.rasip.fer.hr/pub/mutt/international/ \
ftp://ftp.gbnet.net/pub/mutt-international/ \
@ -18,7 +17,6 @@ MASTER_SITES= ftp://ftp.guug.de/pub/mutt/ \
ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/mutt-international/ \
ftp://ftp.gwdg.de/pub/unix/mail/mutt/international/ \
ftp://ftp.iks-jena.de/pub/mitarb/lutz/crypt/software/pgp/mutt/
DISTNAME= ${PORTNAME}-${PORTVERSION}i
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} charmaps-0.0.tar.gz
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}

View file

@ -1,3 +1,3 @@
MD5 (mutt/mutt-1.2.5i.tar.gz) = 0ba5367059abdd55daceb82dce6be42f
MD5 (mutt/mutt-1.2.5.1.tar.gz) = 2ede4b04ad0a4c8ecdbaa322f416a8c6
MD5 (mutt/charmaps-0.0.tar.gz) = e79b9f57da1f6a4d0a63ff60a4ef7da8
MD5 (mutt/patch-1.2.5.rr.compressed.1.gz) = 95bec646c20ef1d7f5680302dce2783b
MD5 (mutt/patch-1.2.5.1.rr.compressed.1.gz) = 2bb00d62cc7740624c45b01878d24bc7

View file

@ -1,124 +0,0 @@
diff -u -r2.9.2.1 rfc822.c
--- rfc822.c 2000/06/22 10:54:58 2.9.2.1
+++ rfc822.c 2002/01/01 10:24:05
@@ -33,6 +33,12 @@
#include "rfc822.h"
#endif
+#define terminate_string(a, b, c) do { if ((b) < (c)) a[(b)] = 0; else \
+ a[(c)] = 0; } while (0)
+
+#define terminate_buffer(a, b) terminate_string(a, b, sizeof (a) - 1)
+
+
const char RFC822Specials[] = "@.,:;<>[]\\\"()";
#define is_special(x) strchr(RFC822Specials,x)
@@ -227,12 +233,12 @@
return NULL;
}
- token[*tokenlen] = 0;
+ terminate_string (token, *tokenlen, tokenmax);
addr->mailbox = safe_strdup (token);
if (*commentlen && !addr->personal)
{
- comment[*commentlen] = 0;
+ terminate_string (comment, *commentlen, commentmax);
addr->personal = safe_strdup (comment);
}
@@ -320,9 +326,6 @@
*last = cur;
}
-#define terminate_string(a, b) do { if (b < sizeof(a) - 1) a[b] = 0; else \
- a[sizeof(a) - 1] = 0; } while (0)
-
ADDRESS *rfc822_parse_adrlist (ADDRESS *top, const char *s)
{
const char *begin, *ps;
@@ -344,12 +347,12 @@
{
if (phraselen)
{
- terminate_string (phrase, phraselen);
+ terminate_buffer (phrase, phraselen);
add_addrspec (&top, &last, phrase, comment, &commentlen, sizeof (comment) - 1);
}
else if (commentlen && last && !last->personal)
{
- terminate_string (comment, commentlen);
+ terminate_buffer (comment, commentlen);
last->personal = safe_strdup (comment);
}
@@ -377,7 +380,7 @@
else if (*s == ':')
{
cur = rfc822_new_address ();
- terminate_string (phrase, phraselen);
+ terminate_buffer (phrase, phraselen);
cur->mailbox = safe_strdup (phrase);
cur->group = 1;
@@ -401,12 +404,12 @@
{
if (phraselen)
{
- terminate_string (phrase, phraselen);
+ terminate_buffer (phrase, phraselen);
add_addrspec (&top, &last, phrase, comment, &commentlen, sizeof (comment) - 1);
}
else if (commentlen && last && !last->personal)
{
- terminate_string (phrase, phraselen);
+ terminate_buffer (phrase, phraselen);
last->personal = safe_strdup (comment);
}
#ifdef EXACT_ADDRESS
@@ -430,7 +433,7 @@
}
else if (*s == '<')
{
- terminate_string (phrase, phraselen);
+ terminate_buffer (phrase, phraselen);
cur = rfc822_new_address ();
if (phraselen)
{
@@ -459,7 +462,7 @@
}
else
{
- if (phraselen && phraselen < sizeof (phrase) - 1)
+ if (phraselen && phraselen < sizeof (phrase) - 1 && *s != '.')
phrase[phraselen++] = ' ';
if ((ps = next_token (s, phrase, &phraselen, sizeof (phrase) - 1)) == NULL)
{
@@ -473,13 +476,13 @@
if (phraselen)
{
- terminate_string (phrase, phraselen);
- terminate_string (comment, commentlen);
+ terminate_buffer (phrase, phraselen);
+ terminate_buffer (comment, commentlen);
add_addrspec (&top, &last, phrase, comment, &commentlen, sizeof (comment) - 1);
}
else if (commentlen && last && !last->personal)
{
- terminate_string (comment, commentlen);
+ terminate_buffer (comment, commentlen);
last->personal = safe_strdup (comment);
}
#ifdef EXACT_ADDRESS
@@ -498,7 +501,7 @@
if (!addr->group && addr->mailbox && strchr (addr->mailbox, '@') == NULL)
{
p = safe_malloc (mutt_strlen (addr->mailbox) + mutt_strlen (host) + 2);
- sprintf (p, "%s@%s", addr->mailbox, host);
+ sprintf (p, "%s@%s", addr->mailbox, host); /* __SPRINTF_CHECKED__ */
safe_free ((void **) &addr->mailbox);
addr->mailbox = p;
}