glibc/iconv
Aurelien Jarno 9a4b0eaf72 iconv: do not report error exit with transliteration [BZ #32448]
Commit 6cbf845fcd ("iconv: Preserve iconv -c error exit on invalid
inputs (bug 32046)") changed the error exit code to report an error when
an input character has been transliterated. This looks like a bug as the
moto in the iconv program is to report an error code in the same
condition as the iconv() function.

This happens because the STANDARD_TO_LOOP_ERR_HANDLER macro sets a
default value for result and later updates it if the transliteration
succeed. With the changes, setting the default value also marks the
input as illegal.

Fix that by setting up the default value of result only when the
transliteration is not used. This works because __gconv_transliterate()
calls __gconv_mark_illegal_input() to return an error. At the same time
also fix the typo outself -> ourselves.

Fixes: 6cbf845fcd
Resolves: BZ #32448
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-12-16 21:33:39 +01:00
..
dummy-repertoire.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gconv_builtin.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gconv_builtin.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gconv_cache.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gconv_charset.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gconv_charset.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gconv_close.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gconv_conf.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gconv_db.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gconv_dl.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gconv_int.h iconv: Preserve iconv -c error exit on invalid inputs (bug 32046) 2024-09-20 13:51:09 +02:00
gconv_open.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gconv_parseconfdir.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gconv_simple.c iconv: Preserve iconv -c error exit on invalid inputs (bug 32046) 2024-09-20 13:51:09 +02:00
gconv_trans.c iconv: Preserve iconv -c error exit on invalid inputs (bug 32046) 2024-09-20 13:51:09 +02:00
gconv.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
gconv.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
iconv_charmap.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
iconv_close.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
iconv_open.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
iconv_prog.c iconv: Input buffering for the iconv program (bug 6050) 2024-09-20 13:51:09 +02:00
iconv_prog.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
iconv.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
iconv.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
iconvconfig.c Update copyright dates not handled by scripts/update-copyrights 2024-01-01 10:53:40 -08:00
iconvconfig.h Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
loop.c iconv: do not report error exit with transliteration [BZ #32448] 2024-12-16 21:33:39 +01:00
Makefile iconv: Use $(run-program-prefix) for running iconv (bug 32197) 2024-09-24 12:35:40 +02:00
skeleton.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
strtab.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
test-gconv-modules Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-gconv-init-failure-mod.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-gconv-init-failure.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-iconv1.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-iconv2.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-iconv3.c Remove "Contributed by" lines 2021-09-03 22:06:44 +05:30
tst-iconv4.c [BZ #9793] 2009-02-03 01:31:30 +00:00
tst-iconv5.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-iconv6.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-iconv7.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-iconv8.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-iconv9.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-iconv_prog-buffer.sh iconv: Input buffering for the iconv program (bug 6050) 2024-09-20 13:51:09 +02:00
tst-iconv_prog.sh iconv: do not report error exit with transliteration [BZ #32448] 2024-12-16 21:33:39 +01:00
tst-iconv-mt.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-iconv-opt.c Update copyright dates with scripts/update-copyrights 2024-01-01 10:53:40 -08:00
tst-iconv-sticky-input-error.c iconv: Preserve iconv -c error exit on invalid inputs (bug 32046) 2024-09-20 13:51:09 +02:00
tst-translit-locale iconv: Fix matching of multi-character transliterations (bug 31859) 2024-08-05 16:49:57 +02:00
tst-translit-mchar.c iconv: Fix matching of multi-character transliterations (bug 31859) 2024-08-05 16:49:57 +02:00
tst-translit-mchar.sh iconv: Fix matching of multi-character transliterations (bug 31859) 2024-08-05 16:49:57 +02:00
Versions intl: Handle translation output codesets with suffixes [BZ #26383] 2020-09-25 14:47:06 +02:00