aboutsummaryrefslogtreecommitdiff
path: root/mail/metamail
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@FreeBSD.org>2004-02-29 16:41:07 +0000
committerChristian Weisgerber <naddy@FreeBSD.org>2004-02-29 16:41:07 +0000
commitd110f6043522f64ede729a0bf6c0bc4df7387be8 (patch)
treea33d6751b9d4208d9221dca3faef2175e5b64f69 /mail/metamail
parent819d9c124427924bb257816d515e263599c6a09e (diff)
downloadports-d110f6043522f64ede729a0bf6c0bc4df7387be8.tar.gz
ports-d110f6043522f64ede729a0bf6c0bc4df7387be8.zip
Fix incorrect buffer overflow fix: pass the size of the target
buffer rather than taking the size of the pointer.
Notes
Notes: svn path=/head/; revision=102549
Diffstat (limited to 'mail/metamail')
-rw-r--r--mail/metamail/Makefile2
-rw-r--r--mail/metamail/files/patch-ae49
2 files changed, 45 insertions, 6 deletions
diff --git a/mail/metamail/Makefile b/mail/metamail/Makefile
index fe4f9458966d..fbc90ea886ab 100644
--- a/mail/metamail/Makefile
+++ b/mail/metamail/Makefile
@@ -7,7 +7,7 @@
PORTNAME= metamail
PORTVERSION= 2.7
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= mail
MASTER_SITES= ftp://thumper.bellcore.com/pub/nsb/
DISTNAME= mm${PORTVERSION}
diff --git a/mail/metamail/files/patch-ae b/mail/metamail/files/patch-ae
index 3cfe25c60518..b2fa41111c6a 100644
--- a/mail/metamail/files/patch-ae
+++ b/mail/metamail/files/patch-ae
@@ -1,5 +1,5 @@
-*** metamail/splitmail.c.orig Mon Jan 31 16:23:14 1994
---- metamail/splitmail.c Wed Feb 18 15:39:09 2004
+*** metamail/splitmail.c.orig Mon Jan 31 23:23:14 1994
+--- metamail/splitmail.c Sat Feb 28 19:17:32 2004
***************
*** 41,48 ****
#define VERBOSEDELIVERYCMD VerboseDeliveryCmd
@@ -20,6 +20,45 @@
usageexit() {
***************
+*** 194,200 ****
+ s = endofheader(from); /* would be index(from, '\n'),
+ but need to check for continuation lines */
+ *s = '\0';
+! if (ShareThisHeader(from, SubjectBuf, &OrigID)) {
+ strcat(SharedHeaders, from);
+ strcat(SharedHeaders, "\n");
+ }
+--- 194,200 ----
+ s = endofheader(from); /* would be index(from, '\n'),
+ but need to check for continuation lines */
+ *s = '\0';
+! if (ShareThisHeader(from, SubjectBuf, sizeof(SubjectBuf), &OrigID)) {
+ strcat(SharedHeaders, from);
+ strcat(SharedHeaders, "\n");
+ }
+***************
+*** 339,347 ****
+ NULL
+ };
+
+! ShareThisHeader(s, SubjectBuf, OrigID)
+ char *s;
+ char *SubjectBuf;
+ char **OrigID;
+ {
+ int i;
+--- 339,348 ----
+ NULL
+ };
+
+! ShareThisHeader(s, SubjectBuf, size, OrigID)
+ char *s;
+ char *SubjectBuf;
++ size_t size;
+ char **OrigID;
+ {
+ int i;
+***************
*** 361,367 ****
}
if (!ULstrcmp(s, "subject")) {
@@ -28,12 +67,12 @@
return(0);
}
if (!ULstrcmp(s, "content-type")) {
---- 361,368 ----
+--- 362,369 ----
}
if (!ULstrcmp(s, "subject")) {
*colon = ':';
-! strncpy(SubjectBuf, ++colon, sizeof(SubjectBuf));
-! SubjectBuf[sizeof(SubjectBuf) - 1] = '\0';
+! strncpy(SubjectBuf, ++colon, size);
+! SubjectBuf[size - 1] = '\0';
return(0);
}
if (!ULstrcmp(s, "content-type")) {