summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/stdexcept.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxxabi/src/stdexcept.cpp')
-rw-r--r--libcxxabi/src/stdexcept.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxxabi/src/stdexcept.cpp b/libcxxabi/src/stdexcept.cpp
index de859db4581..48140b35faf 100644
--- a/libcxxabi/src/stdexcept.cpp
+++ b/libcxxabi/src/stdexcept.cpp
@@ -80,7 +80,7 @@ __libcpp_nmstr::__libcpp_nmstr(const char* msg)
c->len = c->cap = len;
str_ += offset;
count() = 0;
- std::strcpy(const_cast<char*>(c_str()), msg);
+ std::memcpy(const_cast<char*>(c_str()), msg, len + 1);
}
inline
OpenPOWER on IntegriCloud