diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-02-03 01:31:30 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-02-03 01:31:30 +0000 |
commit | 1b14353ee3b4e840e3722fd3dbf1a371fc73f0ca (patch) | |
tree | b9e47fbe4335af7bdfd85587abbbbaefe58ef97a /iconv/gconv_trans.c | |
parent | ebc22416e4ab003dbe67c53590cfeaefd2b37da6 (diff) | |
download | glibc-1b14353ee3b4e840e3722fd3dbf1a371fc73f0ca.tar.gz |
[BZ #9793]
2009-02-02 Ulrich Drepper <drepper@redhat.com>
[BZ #9793]
* iconv/gconv_trans.c (__gconv_transliterate): Don't change
*OUTBUFSTART unless the whole output fit into the buffer.
* iconv/Makefile (tests): Add tst-iconv4.
* iconv/tst-iconv4.c: New file.
Diffstat (limited to 'iconv/gconv_trans.c')
-rw-r--r-- | iconv/gconv_trans.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/iconv/gconv_trans.c b/iconv/gconv_trans.c index 9e04e64ee2..1f1dd01b19 100644 --- a/iconv/gconv_trans.c +++ b/iconv/gconv_trans.c @@ -1,5 +1,5 @@ /* Transliteration using the locale's data. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@cygnus.com>, 2000. @@ -139,7 +139,10 @@ __gconv_transliterate (struct __gconv_step *step, ++*irreversible; res = __GCONV_OK; } - *outbufstart = outptr; + /* Do not increment the output pointer if we could not + store the entire output. */ + if (res != __GCONV_FULL_OUTPUT) + *outbufstart = outptr; return res; } |