diff options
| author | Eric Fiselier <eric@efcs.ca> | 2019-09-14 19:55:28 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2019-09-14 19:55:28 +0000 |
| commit | 6bc1236d395187334051b99e2fcd715a54753f33 (patch) | |
| tree | 0e92a90f8c74e5dbc05b40f34a32d2f0e07f7171 /libcxx/include/string_view | |
| parent | b8185153f35446c2a8db48ee711d2fb577674c18 (diff) | |
| download | bcm5719-llvm-6bc1236d395187334051b99e2fcd715a54753f33.tar.gz bcm5719-llvm-6bc1236d395187334051b99e2fcd715a54753f33.zip | |
Add debug check for null pointers passed to <string_view>
llvm-svn: 371925
Diffstat (limited to 'libcxx/include/string_view')
| -rw-r--r-- | libcxx/include/string_view | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/string_view b/libcxx/include/string_view index 04448312ff3..3a30db8b17b 100644 --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -235,7 +235,7 @@ public: _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY basic_string_view(const _CharT* __s) - : __data(__s), __size(_Traits::length(__s)) {} + : __data(__s), __size(std::__char_traits_length_checked<_Traits>(__s)) {} // [string.view.iterators], iterators _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY |

