Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Clow <mclow@qualcomm.com>2013-03-22 06:14:40 +0400
committerMarshall Clow <mclow@qualcomm.com>2013-03-22 06:14:40 +0400
commitc962cdf8a507bd1d718e952fc50cd14a015862aa (patch)
tree86a3a9abfc388755057d8d66603059b0f547190d /libcxx/include/locale
parent1c2c986796f1cd23ccdaf10ffe1a9e70c936b19c (diff)
Fix buffer read overflow in money_get::do_get(). Found by UBSan
llvm-svn: 177694
Diffstat (limited to 'libcxx/include/locale')
-rw-r--r--libcxx/include/locale2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/locale b/libcxx/include/locale
index 662b980cb295..1c7156c80f24 100644
--- 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");