Explorar o código

Handle non-null-terminated function name in ETW

Paul Leathers %!s(int64=7) %!d(string=hai) anos
pai
achega
9315cc68e9
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/Runtime/Base/EtwTrace.cpp

+ 1 - 1
lib/Runtime/Base/EtwTrace.cpp

@@ -382,7 +382,7 @@ size_t EtwTrace::GetSimpleJitFunctionName(
     const size_t suffixCharLength = _countof(_u("Simple")) - 1;
 
     const char16 *const functionName = GetFunctionName(body);
-    const size_t functionNameCharLength = wcslen(functionName);
+    const size_t functionNameCharLength = body->GetDisplayNameLength();
     const size_t requiredCharCapacity = functionNameCharLength + suffixCharLength + 1;
     if(requiredCharCapacity > nameCharCapacity || name == NULL)
     {