From 8f25676c83eef5c85db98f9cf027890fbe810447 Mon Sep 17 00:00:00 2001 From: Stefan Liebler Date: Wed, 25 May 2016 17:18:06 +0200 Subject: Fix ucs4le_internal_loop in error case. [BZ #19726] When converting from UCS4LE to INTERNAL, the input-value is checked for a too large value and the iconv() call sets errno to EILSEQ. In this case the inbuf argument of the iconv() call should point to the invalid character, but it points to the beginning of the inbuf. Thus this patch updates the pointers inptrp and outptrp before returning in this error case. This patch also adds a new testcase for this issue. The new test was tested on a s390, power, intel machine. ChangeLog: [BZ #19726] * iconv/gconv_simple.c (ucs4le_internal_loop): Update inptrp and outptrp in case of an illegal input. * iconv/tst-iconv6.c: New file. * iconv/Makefile (tests): Add tst-iconv6. --- iconv/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iconv/Makefile') diff --git a/iconv/Makefile b/iconv/Makefile index b008707eb5..c2299c9323 100644 --- a/iconv/Makefile +++ b/iconv/Makefile @@ -42,7 +42,7 @@ CFLAGS-charmap.c = -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \ CFLAGS-linereader.c = -DNO_TRANSLITERATION CFLAGS-simple-hash.c = -I../locale -tests = tst-iconv1 tst-iconv2 tst-iconv3 tst-iconv4 tst-iconv5 +tests = tst-iconv1 tst-iconv2 tst-iconv3 tst-iconv4 tst-iconv5 tst-iconv6 others = iconv_prog iconvconfig install-others-programs = $(inst_bindir)/iconv -- cgit v1.2.3