projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c2c986
)
Fix buffer read overflow in money_get::do_get(). Found by UBSan
author
Marshall Clow
<mclow@qualcomm.com>
Fri, 22 Mar 2013 02:14:40 +0000
(
02:14
+0000)
committer
Marshall Clow
<mclow@qualcomm.com>
Fri, 22 Mar 2013 02:14:40 +0000
(
02:14
+0000)
llvm-svn: 177694
libcxx/include/locale
patch
|
blob
|
history
diff --git
a/libcxx/include/locale
b/libcxx/include/locale
index
662b980
..
1c7156c
100644
(file)
--- a/
libcxx/include/locale
+++ b/
libcxx/include/locale
@@
-3359,7
+3359,7
@@
money_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
if (__neg)
*__nc++ = '-';
for (const char_type* __w = __wb.get(); __w < __wn; ++__w, ++__nc)
- *__nc = __src[find(__atoms, _
_atoms+sizeof
(__atoms), *__w) - __atoms];
+ *__nc = __src[find(__atoms, _
VSTD::end
(__atoms), *__w) - __atoms];
*__nc = char();
if (sscanf(__nbuf, "%Lf", &__v) != 1)
__throw_runtime_error("money_get error");