From a75846dd88223f69fd6714787e0195ebaa7a2a90 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 23 Jul 2022 12:37:00 +0200 Subject: [PATCH] Do not try to demangle really long function names. --- public/client/TracyCallstack.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/public/client/TracyCallstack.cpp b/public/client/TracyCallstack.cpp index 1629679f..7d39ba97 100644 --- a/public/client/TracyCallstack.cpp +++ b/public/client/TracyCallstack.cpp @@ -83,6 +83,7 @@ void ___tracy_free_demangle_buffer() extern "C" const char* ___tracy_demangle( const char* mangled ) { if( !mangled || mangled[0] != '_' ) return nullptr; + if( strlen( mangled ) > ___tracy_demangle_buffer_len ) return nullptr; int status; size_t len = ___tracy_demangle_buffer_len; return abi::__cxa_demangle( mangled, ___tracy_demangle_buffer, &len, &status );