summary refs log tree commit diff
path: root/iconv/loop.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /iconv/loop.c
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.xz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
2.5-18.1
Diffstat (limited to 'iconv/loop.c')
-rw-r--r--iconv/loop.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/iconv/loop.c b/iconv/loop.c
index 1918fe5007..9785bf865c 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