summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libetpanstuff/mailmime_decode.c_arm_031_patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/noncore/net/mail/libetpanstuff/mailmime_decode.c_arm_031_patch b/noncore/net/mail/libetpanstuff/mailmime_decode.c_arm_031_patch
new file mode 100644
index 0000000..2963a14
--- a/dev/null
+++ b/noncore/net/mail/libetpanstuff/mailmime_decode.c_arm_031_patch
@@ -0,0 +1,49 @@
1 --- mailmime_decode.c.orig2003-12-18 13:52:20.000000000 +0100
2 +++ mailmime_decode.c2003-12-18 13:50:46.000000000 +0100
3@@ -102,8 +102,8 @@
4 size_t cur_token;
5 int r;
6 int res;
7- char * str;
8- char * wordutf8;
9+ char * str = 0;
10+ char * wordutf8 = 0;
11 int type;
12
13 cur_token = * index;
14@@ -147,14 +147,14 @@
15 goto free;
16 }
17
18- if (mmap_string_append(gphrase, wordutf8) == NULL) {
19+ if (wordutf8==NULL || mmap_string_append(gphrase, wordutf8) == NULL) {
20 mailmime_encoded_word_free(word);
21- free(wordutf8);
22+ if (wordutf8) free(wordutf8);
23 res = MAILIMF_ERROR_MEMORY;
24 goto free;
25 }
26 mailmime_encoded_word_free(word);
27- free(wordutf8);
28+ if (wordutf8) free(wordutf8);
29 first = FALSE;
30 }
31 else if (r == MAILIMF_ERROR_PARSE) {
32@@ -183,14 +183,14 @@
33 r = charconv(tocode, default_fromcode, raw_word,
34 strlen(raw_word), &wordutf8);
35
36 -if (mmap_string_append(gphrase, wordutf8) == NULL) {
37- free(wordutf8);
38 +if (wordutf8==NULL || mmap_string_append(gphrase, wordutf8) == NULL) {
39+ if (wordutf8)free(wordutf8);
40 mailimf_word_free(raw_word);
41 res = MAILIMF_ERROR_MEMORY;
42 goto free;
43 }
44
45- free(wordutf8);
46+ if (wordutf8) free(wordutf8);
47 mailimf_word_free(raw_word);
48 first = FALSE;
49 }