From 41ff095c0a77ba9528cb7c6e540612f96b818dcc Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 3 Jun 2024 02:40:13 +0300 Subject: [PATCH] Try to fix the false positive with GCC ASAN --- include/boost/system/detail/generic_category_message.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/system/detail/generic_category_message.hpp b/include/boost/system/detail/generic_category_message.hpp index d2f2e41c..611ce378 100644 --- a/include/boost/system/detail/generic_category_message.hpp +++ b/include/boost/system/detail/generic_category_message.hpp @@ -47,7 +47,7 @@ inline char const * generic_error_category_message( int ev, char * buffer, std:: { // strerror_r requires non-null buffer pointer - char tmp[ 1 ]; + char tmp[ 1 ] = {}; char const* r = strerror_r_helper( strerror_r( ev, tmp, 0 ), buffer ); return r == tmp? nullptr: r;