diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-08-24 07:23:32 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-08-24 07:23:32 +0000 |
commit | 8bf34d8a27ffed48c7a43b7c7347235d389b0946 (patch) | |
tree | 36a2efd2a73c3d642829770b47f753e0160dd411 /wcsmbs | |
parent | d2b0f6344275bc3624e47a4d02b67a7e131f6f56 (diff) | |
download | glibc-8bf34d8a27ffed48c7a43b7c7347235d389b0946.tar.gz glibc-8bf34d8a27ffed48c7a43b7c7347235d389b0946.tar.xz glibc-8bf34d8a27ffed48c7a43b7c7347235d389b0946.zip |
Updated to fedora-glibc-20050824T0705
Diffstat (limited to 'wcsmbs')
-rw-r--r-- | wcsmbs/bits/wchar2.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/wcsmbs/bits/wchar2.h b/wcsmbs/bits/wchar2.h index fba18d9003..6eac952ac9 100644 --- a/wcsmbs/bits/wchar2.h +++ b/wcsmbs/bits/wchar2.h @@ -324,8 +324,9 @@ __NTH (mbsrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, { if (__bos (__dst) != (size_t) -1 && (!__builtin_constant_p (__len) - || __len * sizeof (wchar_t) > __bos (__dst))) - return __mbsrtowcs_chk (__dst, __src, __len, __ps, __bos (__dst)); + || __len > __bos (__dst) / sizeof (wchar_t))) + return __mbsrtowcs_chk (__dst, __src, __len, __ps, + __bos (__dst) / sizeof (wchar_t)); return __mbsrtowcs_alias (__dst, __src, __len, __ps); } @@ -368,8 +369,9 @@ __NTH (mbsnrtowcs (wchar_t *__restrict __dst, __const char **__restrict __src, { if (__bos (__dst) != (size_t) -1 && (!__builtin_constant_p (__len) - || __len * sizeof (wchar_t) > __bos (__dst))) - return __mbsnrtowcs_chk (__dst, __src, __nmc, __len, __ps, __bos (__dst)); + || __len > __bos (__dst) / sizeof (wchar_t))) + return __mbsnrtowcs_chk (__dst, __src, __nmc, __len, __ps, + __bos (__dst) / sizeof (wchar_t)); return __mbsnrtowcs_alias (__dst, __src, __nmc, __len, __ps); } |