summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libetpanstuff/libetpan-0.32-mimecontent_dbsymbol.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/noncore/net/mail/libetpanstuff/libetpan-0.32-mimecontent_dbsymbol.patch b/noncore/net/mail/libetpanstuff/libetpan-0.32-mimecontent_dbsymbol.patch
new file mode 100644
index 0000000..1c2c723
--- a/dev/null
+++ b/noncore/net/mail/libetpanstuff/libetpan-0.32-mimecontent_dbsymbol.patch
@@ -0,0 +1,90 @@
1diff -ru libetpan-0.32/mime/mailmime_content.c libetpan-0.32-patched/mime/mailmime_content.c
2 --- libetpan-0.32/mime/mailmime_content.c2003-12-08 16:36:38.000000000 +0100
3 +++ libetpan-0.32-patched/mime/mailmime_content.c2003-12-21 15:42:04.000000000 +0100
4@@ -1549,7 +1549,7 @@
5 /* ************************************************************************* */
6 /* MIME part decoding */
7
8-static char get_base64_value(char ch)
9+static signed char get_base64_value(char ch)
10 {
11 if ((ch >= 'A') && (ch <= 'Z'))
12 return ch - 'A';
13@@ -1595,7 +1595,7 @@
14
15 i = 0;
16 while (1) {
17- char value;
18+ signed char value;
19
20 value = -1;
21 while (value == -1) {
22diff -ru libetpan-0.32/mime/mailmime_decode.c libetpan-0.32-patched/mime/mailmime_decode.c
23 --- libetpan-0.32/mime/mailmime_decode.c2003-12-03 22:35:31.000000000 +0100
24 +++ libetpan-0.32-patched/mime/mailmime_decode.c2003-12-21 15:42:25.000000000 +0100
25@@ -102,8 +102,8 @@
26 size_t cur_token;
27 int r;
28 int res;
29- char * str;
30- char * wordutf8;
31+ char * str = 0;
32+ char * wordutf8 = 0;
33 int type;
34
35 cur_token = * index;
36@@ -147,14 +147,14 @@
37 goto free;
38 }
39
40- if (mmap_string_append(gphrase, wordutf8) == NULL) {
41+ if (wordutf8==NULL || mmap_string_append(gphrase, wordutf8) == NULL) {
42 mailmime_encoded_word_free(word);
43- free(wordutf8);
44+ if (wordutf8) free(wordutf8);
45 res = MAILIMF_ERROR_MEMORY;
46 goto free;
47 }
48 mailmime_encoded_word_free(word);
49- free(wordutf8);
50+ if (wordutf8) free(wordutf8);
51 first = FALSE;
52 }
53 else if (r == MAILIMF_ERROR_PARSE) {
54@@ -183,14 +183,14 @@
55 r = charconv(tocode, default_fromcode, raw_word,
56 strlen(raw_word), &wordutf8);
57
58 -if (mmap_string_append(gphrase, wordutf8) == NULL) {
59- free(wordutf8);
60 +if (wordutf8==NULL || mmap_string_append(gphrase, wordutf8) == NULL) {
61+ if (wordutf8)free(wordutf8);
62 mailimf_word_free(raw_word);
63 res = MAILIMF_ERROR_MEMORY;
64 goto free;
65 }
66
67- free(wordutf8);
68+ if (wordutf8) free(wordutf8);
69 mailimf_word_free(raw_word);
70 first = FALSE;
71 }
72diff -ru libetpan-0.32/tools/mail_cache_db.c libetpan-0.32-patched/tools/mail_cache_db.c
73 --- libetpan-0.32/tools/mail_cache_db.c2003-12-15 04:33:58.000000000 +0100
74 +++ libetpan-0.32-patched/tools/mail_cache_db.c2003-12-21 15:45:36.000000000 +0100
75@@ -65,12 +65,13 @@
76
77 return cache_db;
78 }
79-
80+#endif
81 static void mail_cache_db_free(struct mail_cache_db * cache_db)
82 {
83+#if DBVERS >= 1
84 free(cache_db);
85-}
86 #endif
87+}
88
89 int mail_cache_db_open(const char * filename,
90 struct mail_cache_db ** pcache_db)