Commit 7d4e4a32 authored by sgjesse@chromium.org's avatar sgjesse@chromium.org

Fix possibly wrong use of strncpy_s

This should also fix MinGW build.
Review URL: http://codereview.chromium.org/6376003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6382 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6b4d2976
...@@ -1474,7 +1474,7 @@ Thread::Thread(const char* name) : ThreadHandle(ThreadHandle::INVALID) { ...@@ -1474,7 +1474,7 @@ Thread::Thread(const char* name) : ThreadHandle(ThreadHandle::INVALID) {
void Thread::set_name(const char* name) { void Thread::set_name(const char* name) {
strncpy_s(name_, name, sizeof(name_)); OS::StrNCpy(Vector<char>(name_, sizeof(name_)), name, strlen(name));
name_[sizeof(name_) - 1] = '\0'; name_[sizeof(name_) - 1] = '\0';
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment