about summary refs log tree commit diff
path: root/rfc2047.c
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-07-12 16:15:22 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2016-07-12 16:15:22 +0200
commit56a30a406805e0be07904cf83c8de90e94a4009c (patch)
tree2e53dbf26afbea2dc2a702ba053b2fb511d96e9e /rfc2047.c
parent3d40dedd96c9ba19e4451f08ce139f26ebff9cf2 (diff)
downloadmblaze-56a30a406805e0be07904cf83c8de90e94a4009c.tar.gz
mblaze-56a30a406805e0be07904cf83c8de90e94a4009c.tar.xz
mblaze-56a30a406805e0be07904cf83c8de90e94a4009c.zip
rfc2047: suppress common error messages
Diffstat (limited to 'rfc2047.c')
-rw-r--r--rfc2047.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/rfc2047.c b/rfc2047.c
index 47d1e80..3781526 100644
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -163,11 +163,15 @@ blaze822_decode_rfc2047(char *dst, char *src, size_t dlen, char *tgtenc)
 
 		int r = iconv(ic, &dec, &declen, &dst, &dlen);
 		if (r < 0) {
-			if (errno == E2BIG)
+			if (errno == E2BIG) {
+				iconv_close(ic);
 				break;
-			perror("iconv");
-			iconv_close(ic);
-			goto nocode;
+			} else if (errno == EILSEQ || errno == EINVAL) {
+				goto nocode;
+			} else {
+				perror("iconv");
+				goto nocode;
+			}
 		}
 
 		iconv_close(ic);