Try to fix the false positive with GCC ASAN

This commit is contained in:
Peter Dimov
2024-06-03 02:40:13 +03:00
parent 38d63aaf7c
commit 41ff095c0a

View File

@ -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;