projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Nico Golde:
[apps/madmutt.git]
/
imap
/
utf7.c
diff --git
a/imap/utf7.c
b/imap/utf7.c
index
8d7d206
..
95e8fd6
100644
(file)
--- a/
imap/utf7.c
+++ b/
imap/utf7.c
@@
-234,8
+234,11
@@
void imap_utf7_encode (char **s)
if (Charset) {
char *t = str_dup (*s);
if (Charset) {
char *t = str_dup (*s);
- if (!mutt_convert_string (&t, Charset, "UTF-8", 0))
- utf8_to_utf7 (t, str_len (t), s, 0);
+ if (!mutt_convert_string (&t, Charset, "UTF-8", 0)) {
+ char *u7 = utf8_to_utf7 (t, strlen (t), NULL, 0);
+ mem_free (s);
+ *s = u7;
+ }
mem_free (&t);
}
}
mem_free (&t);
}
}