diff options
| author | Hiroki Sato <hrs@FreeBSD.org> | 2013-11-25 01:26:06 +0000 |
|---|---|---|
| committer | Hiroki Sato <hrs@FreeBSD.org> | 2013-11-25 01:26:06 +0000 |
| commit | 7c5b23111c5fd1992047922d4247c4a1ce1bb6c3 (patch) | |
| tree | 7c53259610137077d7bca0370a6246a61e862300 /lib/libiconv_modules | |
| parent | 1b57cec7d999c971d6c4bcb3df6f6397670e1326 (diff) | |
Notes
Diffstat (limited to 'lib/libiconv_modules')
| -rw-r--r-- | lib/libiconv_modules/iconv_std/citrus_iconv_std.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/libiconv_modules/iconv_std/citrus_iconv_std.c b/lib/libiconv_modules/iconv_std/citrus_iconv_std.c index b30f09928ae8..54a00d0d56ae 100644 --- a/lib/libiconv_modules/iconv_std/citrus_iconv_std.c +++ b/lib/libiconv_modules/iconv_std/citrus_iconv_std.c @@ -543,6 +543,16 @@ _citrus_iconv_std_iconv_convert(struct _citrus_iconv * __restrict cv, ret = do_conv(is, &csid, &idx); if (ret) { if (ret == E_NO_CORRESPONDING_CHAR) { + /* + * GNU iconv returns EILSEQ when no + * corresponding character in the output. + * Some software depends on this behavior + * though this is against POSIX specification. + */ + if (cv->cv_shared->ci_ilseq_invalid != 0) { + ret = EILSEQ; + goto err; + } inval++; szrout = 0; if ((((flags & _CITRUS_ICONV_F_HIDE_INVALID) == 0) && |
