From 56a30a406805e0be07904cf83c8de90e94a4009c Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Tue, 12 Jul 2016 16:15:22 +0200 Subject: rfc2047: suppress common error messages --- rfc2047.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'rfc2047.c') 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); -- cgit 1.4.1