aboutsummaryrefslogtreecommitdiff
path: root/iconv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-11-08 00:04:24 +0000
committerUlrich Drepper <drepper@redhat.com>2007-11-08 00:04:24 +0000
commitf2a8406a4f5974230d33995105160a8bacbce500 (patch)
treeae84626e8353895088f0457362dcf446fbc68557 /iconv
parent9ca230d62f1813679700f821d3de48ce4aa73f2a (diff)
downloadglibc-f2a8406a4f5974230d33995105160a8bacbce500.tar
glibc-f2a8406a4f5974230d33995105160a8bacbce500.tar.gz
glibc-f2a8406a4f5974230d33995105160a8bacbce500.tar.bz2
glibc-f2a8406a4f5974230d33995105160a8bacbce500.zip
[BZ #5277]
2007-11-07 Ulrich Drepper <drepper@redhat.com> [BZ #5277] * iconv/loop.c (STANDARD_TO_LOOP_ERR_HANDLER): If conversion failed because output buffer is too small break, don't loop. * iconvdata/Makefile (tests): Add bug-iconv6. * iconvdata/bug-iconv6.c: New file.
Diffstat (limited to 'iconv')
-rw-r--r--iconv/loop.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/iconv/loop.c b/iconv/loop.c
index 9785bf865c..df8c8dce9f 100644
--- a/iconv/loop.c
+++ b/iconv/loop.c
@@ -225,7 +225,12 @@
} \
/* If any of them recognized the input continue with the loop. */ \
if (result != __GCONV_ILLEGAL_INPUT) \
- continue; \
+ { \
+ if (__builtin_expect (result == __GCONV_FULL_OUTPUT, 0)) \
+ break; \
+ \
+ continue; \
+ } \
\
/* Next see whether we have to ignore the error. If not, stop. */ \
if (! ignore_errors_p ()) \