diff --git a/deps/v8/src/platform-win32.cc b/deps/v8/src/platform-win32.cc index 81216e190d..a97785e4c3 100644 --- a/deps/v8/src/platform-win32.cc +++ b/deps/v8/src/platform-win32.cc @@ -1474,7 +1474,7 @@ Thread::Thread(const char* name) : ThreadHandle(ThreadHandle::INVALID) { void Thread::set_name(const char* name) { - strncpy_s(name_, name, sizeof(name_)); + strncpy_s(name_, sizeof(name_), name, strlen(name)); name_[sizeof(name_) - 1] = '\0'; }