summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-04-06 22:55:00 +0200
committerLeah Neukirchen <leah@vuxu.org>2017-04-06 22:55:00 +0200
commit36faf7f1146d14e292edd03ee1edf139068e2f53 (patch)
tree5a8bb5682184bf85399c1b7e187a7ff402ab69a9
parentdc20c8248b29f6837aee222a32bb5eaef809a337 (diff)
downloadmblaze-36faf7f1146d14e292edd03ee1edf139068e2f53.tar.gz
mblaze-36faf7f1146d14e292edd03ee1edf139068e2f53.tar.xz
mblaze-36faf7f1146d14e292edd03ee1edf139068e2f53.zip
rfc2047: blaze822_decode_rfc2047: ignore RFC 2231 language tag
-rw-r--r--rfc2047.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/rfc2047.c b/rfc2047.c
index 6f23d10..d0bd103 100644
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -168,6 +168,9 @@ blaze822_decode_rfc2047(char *dst, char *src, size_t dlen, char *tgtenc)
 				goto nocode;
 			free(srcenc);
 			srcenc = strdup(s);
+			char *lang = strchr(srcenc, '*');
+			if (lang)
+				*lang = 0;  // kill RFC2231 language tag
 			if (!srcenc)
 				goto nocode;
 			if (ic != (iconv_t)-1)