summaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-08-24 07:23:32 +0000
committerJakub Jelinek <jakub@redhat.com>2005-08-24 07:23:32 +0000
commit8bf34d8a27ffed48c7a43b7c7347235d389b0946 (patch)
tree36a2efd2a73c3d642829770b47f753e0160dd411 /stdlib
parentd2b0f6344275bc3624e47a4d02b67a7e131f6f56 (diff)
Updated to fedora-glibc-20050824T0705
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/bits/stdlib.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/stdlib/bits/stdlib.h b/stdlib/bits/stdlib.h
index 9e2519dcfc..4bacb09a09 100644
--- a/stdlib/bits/stdlib.h
+++ b/stdlib/bits/stdlib.h
@@ -89,8 +89,9 @@ __NTH (mbstowcs (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 __mbstowcs_chk (__dst, __src, __len, __bos (__dst));
+ || __len > __bos (__dst) / sizeof (wchar_t)))
+ return __mbstowcs_chk (__dst, __src, __len,
+ __bos (__dst) / sizeof (wchar_t));
return __mbstowcs_alias (__dst, __src, __len);
}