From c0f49c648b2fcdccba5009eb3f009be452814f22 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 26 Feb 2020 22:27:10 +0100 Subject: [PATCH] Validate size. --- client/TracyCallstack.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/client/TracyCallstack.cpp b/client/TracyCallstack.cpp index 49f24c96..8c0c19d1 100644 --- a/client/TracyCallstack.cpp +++ b/client/TracyCallstack.cpp @@ -33,6 +33,7 @@ namespace tracy static inline char* CopyString( const char* src, size_t sz ) { + assert( strlen( src ) == sz ); auto dst = (char*)tracy_malloc( sz + 1 ); memcpy( dst, src, sz ); dst[sz] = '\0';