diff --git a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp --- a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp @@ -236,8 +236,9 @@ } void SetThreadName(std::thread &thread, const std::string &name) { - wchar_t wname[16]; - if (MultiByteToWideChar(CP_UTF8, 0, name.c_str(), -1, wname, 16) > 0) + static constexpr thnmsz = 64; + wchar_t wname[thnamesz + 1]; + if (MultiByteToWideChar(CP_UTF8, 0, name.c_str(), -1, wname, thnmsz) > 0) (void)SetThreadDescription(thread.native_handle(), wname); }