summaryrefslogtreecommitdiff
path: root/mail/exim
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@FreeBSD.org>2014-11-13 17:07:05 +0000
committerVsevolod Stakhov <vsevolod@FreeBSD.org>2014-11-13 17:07:05 +0000
commit7b84f60a761135a9e10df7f342478433bfe4fd24 (patch)
tree04ed29d5b3378d38fa81d938401f88affd800344 /mail/exim
parentUpgrade to 1.4.0. (diff)
Add patch to avoid http://bugs.exim.org/show_bug.cgi?id=1513
Obtained from: exim git and Victor Ustugov adopted patch
Notes
Notes: svn path=/head/; revision=372527
Diffstat (limited to 'mail/exim')
-rw-r--r--mail/exim/Makefile2
-rw-r--r--mail/exim/files/patch-src__mime.c52
2 files changed, 53 insertions, 1 deletions
diff --git a/mail/exim/Makefile b/mail/exim/Makefile
index 347efc595aa3..da1afdc1f100 100644
--- a/mail/exim/Makefile
+++ b/mail/exim/Makefile
@@ -3,7 +3,7 @@
PORTNAME= exim
PORTVERSION?= ${EXIM_VERSION}
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES= mail ipv6
MASTER_SITES= ${MASTER_SITE_EXIM:S/$/:exim/}
MASTER_SITE_SUBDIR= exim4/:exim
diff --git a/mail/exim/files/patch-src__mime.c b/mail/exim/files/patch-src__mime.c
new file mode 100644
index 000000000000..4eb3bc9421f2
--- /dev/null
+++ b/mail/exim/files/patch-src__mime.c
@@ -0,0 +1,52 @@
+diff -urN ../exim-4.84.orig/src/mime.c ../exim-4.84/src/mime.c
+--- ../exim-4.84.orig/src/mime.c 2014-08-09 15:44:29.000000000 +0300
++++ ../exim-4.84/src/mime.c 2014-11-12 02:36:21.000000000 +0200
+@@ -620,12 +620,18 @@
+ else
+ param_value = string_cat(param_value, &size, &ptr, q++, 1);
+ }
+- param_value[ptr++] = '\0';
+- param_value_len = ptr;
+-
+- param_value = rfc2047_decode(param_value, check_rfc2047_length, NULL, 32, &param_value_len, &q);
+- debug_printf("Found %s MIME parameter in %s header, value is '%s'\n", mp->name, mime_header_list[i].name, param_value);
+- *((uschar **)(mp->value)) = param_value;
++ if (param_value)
++ {
++ param_value[ptr++] = '\0';
++ param_value_len = ptr;
++
++ param_value = rfc2047_decode(param_value,
++ check_rfc2047_length, NULL, 32, &param_value_len, &q);
++ debug_printf("Found %s MIME parameter in %s header, "
++ "value is '%s'\n", mp->name, mime_header_list[i].name,
++ param_value);
++ }
++ *mp->value = param_value;
+ p += (mp->namelen + param_value_len + 1);
+ goto NEXT_PARAM_SEARCH;
+ }
+diff -urN ../exim-4.84.orig/src/mime.h ../exim-4.84/src/mime.h
+--- ../exim-4.84.orig/src/mime.h 2014-08-09 15:44:29.000000000 +0300
++++ ../exim-4.84/src/mime.h 2014-11-12 02:36:13.000000000 +0200
+@@ -40,15 +40,15 @@
+
+
+ typedef struct mime_parameter {
+- uschar *name;
+- int namelen;
+- void *value;
++ uschar * name;
++ int namelen;
++ uschar ** value;
+ } mime_parameter;
+
+ static mime_parameter mime_parameter_list[] = {
+- { US"name=", 5, &mime_filename },
++ { US"name=", 5, &mime_filename },
+ { US"filename=", 9, &mime_filename },
+- { US"charset=", 8, &mime_charset },
++ { US"charset=", 8, &mime_charset },
+ { US"boundary=", 9, &mime_boundary }
+ };
+