diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-09-25 16:42:36 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-09-25 16:42:36 +0000 |
commit | 5512d89be3d1f8c58bf5d62c6f493d0d6a4b3dab (patch) | |
tree | 99653b0e29971b0d40d54146e6fd5ca4e31c03b4 | |
parent | 537599773a1420125d233e4c6f32d758bb0edce1 (diff) | |
download | glibc-5512d89be3d1f8c58bf5d62c6f493d0d6a4b3dab.zip glibc-5512d89be3d1f8c58bf5d62c6f493d0d6a4b3dab.tar.gz glibc-5512d89be3d1f8c58bf5d62c6f493d0d6a4b3dab.tar.bz2 |
[!STORE_REST] (SINGLE): Correctly record number of left-over bytes and store them correctly.
-rw-r--r-- | iconv/loop.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/iconv/loop.c b/iconv/loop.c index 1918fe5..9785bf8 100644 --- a/iconv/loop.c +++ b/iconv/loop.c @@ -1,5 +1,5 @@ /* Conversion loop frame work. - Copyright (C) 1998-2002, 2003 Free Software Foundation, Inc. + Copyright (C) 1998-2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998. @@ -450,6 +450,10 @@ SINGLE(LOOPFCT) (struct __gconv_step *step, #else /* We don't have enough input for another complete input character. */ + assert (inend - inptr > (state->__count & ~7)); + assert (inend - inptr <= 7); + state->__count = (state->__count & ~7) | (inend - inptr); + inlen = 0; while (inptr < inend) state->__value.__wchb[inlen++] = *inptr++; #endif |