summaryrefslogtreecommitdiff
path: root/mail/metamail/patches
diff options
context:
space:
mode:
authorsnj <snj>2004-02-28 20:04:40 +0000
committersnj <snj>2004-02-28 20:04:40 +0000
commit3cc2c6e30dfa59667266fe8899e1785fc18bf323 (patch)
tree1c192f08e0c1180ec93b8aee443736655f81dede /mail/metamail/patches
parentf8d5476667e803b9f278147956ced53993e266a6 (diff)
downloadpkgsrc-3cc2c6e30dfa59667266fe8899e1785fc18bf323.tar.gz
Properly fix last. From Christian Weisgerber.
Diffstat (limited to 'mail/metamail/patches')
-rw-r--r--mail/metamail/patches/patch-ae35
1 files changed, 27 insertions, 8 deletions
diff --git a/mail/metamail/patches/patch-ae b/mail/metamail/patches/patch-ae
index c8eadd55e84..ec1094335d4 100644
--- a/mail/metamail/patches/patch-ae
+++ b/mail/metamail/patches/patch-ae
@@ -1,8 +1,6 @@
-$NetBSD: patch-ae,v 1.3 2004/02/25 03:58:43 snj Exp $
-
---- metamail/splitmail.c.orig 1994-01-31 14:23:14.000000000 -0800
-+++ metamail/splitmail.c 2004-02-24 10:49:02.000000000 -0800
-@@ -41,8 +41,8 @@ extern char *malloc(), *index(), *getmyn
+--- metamail/splitmail.c.orig Mon Jan 31 23:23:14 1994
++++ metamail/splitmail.c Sat Feb 28 20:08:44 2004
+@@ -41,8 +41,8 @@
#define VERBOSEDELIVERYCMD VerboseDeliveryCmd
#else
extern char *getenv();
@@ -13,13 +11,34 @@ $NetBSD: patch-ae,v 1.3 2004/02/25 03:58:43 snj Exp $
#endif
usageexit() {
-@@ -361,7 +361,8 @@ char **OrigID;
+@@ -194,7 +194,7 @@
+ s = endofheader(from); /* would be index(from, '\n'),
+ but need to check for continuation lines */
+ *s = '\0';
+- if (ShareThisHeader(from, SubjectBuf, &OrigID)) {
++ if (ShareThisHeader(from, SubjectBuf, sizeof(SubjectBuf), &OrigID)) {
+ strcat(SharedHeaders, from);
+ strcat(SharedHeaders, "\n");
+ }
+@@ -339,9 +339,10 @@
+ NULL
+ };
+
+-ShareThisHeader(s, SubjectBuf, OrigID)
++ShareThisHeader(s, SubjectBuf, size, OrigID)
+ char *s;
+ char *SubjectBuf;
++size_t size;
+ char **OrigID;
+ {
+ int i;
+@@ -361,7 +362,8 @@
}
if (!ULstrcmp(s, "subject")) {
*colon = ':';
- strcpy(SubjectBuf, ++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")) {