diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-07-26 16:42:39 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-07-26 16:42:39 +0000 |
commit | b8a423c2db7442c8e082cd710f3ce052009a12b1 (patch) | |
tree | 40ffaa23531e5afd5f30cdeea708754b73522fc6 /wcsmbs | |
parent | b18ac18e67746792dd969e7ca0b8a92bae341cae (diff) | |
download | glibc-b8a423c2db7442c8e082cd710f3ce052009a12b1.zip glibc-b8a423c2db7442c8e082cd710f3ce052009a12b1.tar.gz glibc-b8a423c2db7442c8e082cd710f3ce052009a12b1.tar.bz2 |
Update.
1999-07-26 Ulrich Drepper <drepper@cygnus.com>
* wcsmbs/wcsrtombs.c (__wcsrtombs): When computing maximum number
of wide characters to convert do it right and don't overestimate
by multiplying with MB_CUR_MAX.
Reported by Bruno Haible <haible@ilog.fr>.
Diffstat (limited to 'wcsmbs')
-rw-r--r-- | wcsmbs/wcsrtombs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wcsmbs/wcsrtombs.c b/wcsmbs/wcsrtombs.c index 5ab8481..a8105d5 100644 --- a/wcsmbs/wcsrtombs.c +++ b/wcsmbs/wcsrtombs.c @@ -94,7 +94,7 @@ __wcsrtombs (dst, src, len, ps) /* This code is based on the safe assumption that all internal multi-byte encodings use the NUL byte only to mark the end of the string. */ - const wchar_t *srcend = *src + __wcsnlen (*src, len * MB_CUR_MAX) + 1; + const wchar_t *srcend = *src + __wcsnlen (*src, len) + 1; size_t dummy; data.__outbuf = dst; |