Lines 1-52
Link Here
|
1 |
diff -urN ../exim-4.84.orig/src/mime.c ../exim-4.84/src/mime.c |
|
|
2 |
--- ../exim-4.84.orig/src/mime.c 2014-08-09 15:44:29.000000000 +0300 |
3 |
+++ ../exim-4.84/src/mime.c 2014-11-12 02:36:21.000000000 +0200 |
4 |
@@ -620,12 +620,18 @@ |
5 |
else |
6 |
param_value = string_cat(param_value, &size, &ptr, q++, 1); |
7 |
} |
8 |
- param_value[ptr++] = '\0'; |
9 |
- param_value_len = ptr; |
10 |
- |
11 |
- param_value = rfc2047_decode(param_value, check_rfc2047_length, NULL, 32, ¶m_value_len, &q); |
12 |
- debug_printf("Found %s MIME parameter in %s header, value is '%s'\n", mp->name, mime_header_list[i].name, param_value); |
13 |
- *((uschar **)(mp->value)) = param_value; |
14 |
+ if (param_value) |
15 |
+ { |
16 |
+ param_value[ptr++] = '\0'; |
17 |
+ param_value_len = ptr; |
18 |
+ |
19 |
+ param_value = rfc2047_decode(param_value, |
20 |
+ check_rfc2047_length, NULL, 32, ¶m_value_len, &q); |
21 |
+ debug_printf("Found %s MIME parameter in %s header, " |
22 |
+ "value is '%s'\n", mp->name, mime_header_list[i].name, |
23 |
+ param_value); |
24 |
+ } |
25 |
+ *mp->value = param_value; |
26 |
p += (mp->namelen + param_value_len + 1); |
27 |
goto NEXT_PARAM_SEARCH; |
28 |
} |
29 |
diff -urN ../exim-4.84.orig/src/mime.h ../exim-4.84/src/mime.h |
30 |
--- ../exim-4.84.orig/src/mime.h 2014-08-09 15:44:29.000000000 +0300 |
31 |
+++ ../exim-4.84/src/mime.h 2014-11-12 02:36:13.000000000 +0200 |
32 |
@@ -40,15 +40,15 @@ |
33 |
|
34 |
|
35 |
typedef struct mime_parameter { |
36 |
- uschar *name; |
37 |
- int namelen; |
38 |
- void *value; |
39 |
+ uschar * name; |
40 |
+ int namelen; |
41 |
+ uschar ** value; |
42 |
} mime_parameter; |
43 |
|
44 |
static mime_parameter mime_parameter_list[] = { |
45 |
- { US"name=", 5, &mime_filename }, |
46 |
+ { US"name=", 5, &mime_filename }, |
47 |
{ US"filename=", 9, &mime_filename }, |
48 |
- { US"charset=", 8, &mime_charset }, |
49 |
+ { US"charset=", 8, &mime_charset }, |
50 |
{ US"boundary=", 9, &mime_boundary } |
51 |
}; |
52 |
|