aboutsummaryrefslogtreecommitdiff
path: root/iconv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-25 22:06:25 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-25 22:06:25 +0000
commit0cdb4983fc3d3b97bebf8c466bdef6226b610996 (patch)
treedfae2c8561a7ec93059bea4e0089edb74f8a1db0 /iconv
parentc7f524b8af9c6e50c10f1201f56d20df807dfec6 (diff)
downloadglibc-0cdb4983fc3d3b97bebf8c466bdef6226b610996.tar
glibc-0cdb4983fc3d3b97bebf8c466bdef6226b610996.tar.gz
glibc-0cdb4983fc3d3b97bebf8c466bdef6226b610996.tar.bz2
glibc-0cdb4983fc3d3b97bebf8c466bdef6226b610996.zip
(ucs4_internal_loop): Don't handle errors when transliterating. (ucs4_internal_loop_unaligned): Likewise. (ucs4le_internal_loop): Likewise. (ucs4le_internal_loop_unaligned): Likewise.
Diffstat (limited to 'iconv')
-rw-r--r--iconv/gconv_simple.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/iconv/gconv_simple.c b/iconv/gconv_simple.c
index 019aac2a3f..9376b151ed 100644
--- a/iconv/gconv_simple.c
+++ b/iconv/gconv_simple.c
@@ -239,6 +239,10 @@ ucs4_internal_loop (struct __gconv_step *step,
this is not an error because of the lack of possibilities to
represent the result. This is a genuine bug in the input since
UCS4 does not allow such values. */
+ if (irreversible == NULL)
+ /* We are transliterating, don't try to correct anything. */
+ return __GCONV_ILLEGAL_INPUT;
+
if (flags & __GCONV_IGNORE_ERRORS)
{
/* Just ignore this character. */
@@ -292,6 +296,10 @@ ucs4_internal_loop_unaligned (struct __gconv_step *step,
this is not an error because of the lack of possibilities to
represent the result. This is a genuine bug in the input since
UCS4 does not allow such values. */
+ if (irreversible == NULL)
+ /* We are transliterating, don't try to correct anything. */
+ return __GCONV_ILLEGAL_INPUT;
+
if (flags & __GCONV_IGNORE_ERRORS)
{
/* Just ignore this character. */
@@ -582,6 +590,10 @@ ucs4le_internal_loop (struct __gconv_step *step,
this is not an error because of the lack of possibilities to
represent the result. This is a genuine bug in the input since
UCS4 does not allow such values. */
+ if (irreversible == NULL)
+ /* We are transliterating, don't try to correct anything. */
+ return __GCONV_ILLEGAL_INPUT;
+
if (flags & __GCONV_IGNORE_ERRORS)
{
/* Just ignore this character. */
@@ -633,6 +645,10 @@ ucs4le_internal_loop_unaligned (struct __gconv_step *step,
this is not an error because of the lack of possibilities to
represent the result. This is a genuine bug in the input since
UCS4 does not allow such values. */
+ if (irreversible == NULL)
+ /* We are transliterating, don't try to correct anything. */
+ return __GCONV_ILLEGAL_INPUT;
+
if (flags & __GCONV_IGNORE_ERRORS)
{
/* Just ignore this character. */
@@ -958,7 +974,7 @@ ucs4le_internal_loop_single (struct __gconv_step *step,
continue; \
} \
\
- if (__builtin_expect (inptr + cnt > inend, 0)) \
+ if (__builtin_expect (inptr + cnt > inend, 0)) \
{ \
/* We don't have enough input. But before we report that check \
that all the bytes are correct. */ \
@@ -972,7 +988,6 @@ ucs4le_internal_loop_single (struct __gconv_step *step,
break; \
} \
\
- /* This is an illegal character. */ \
if (ignore_errors_p ()) \
{ \
/* Ignore it. */ \