2
0
mirror of https://github.com/boostorg/test.git synced 2026-01-29 20:12:09 +00:00

prevent non-null terminated string #2564

[SVN r50322]
This commit is contained in:
Gennadiy Rozental
2008-12-19 07:54:58 +00:00
parent 56b9d832a8
commit 20ee7ba9bf

View File

@@ -200,7 +200,9 @@ report_error( execution_exception::error_code ec, char const* format, ... )
va_list args;
va_start( args, format );
BOOST_TEST_VSNPRINTF( buf, sizeof(buf), format, args );
BOOST_TEST_VSNPRINTF( buf, sizeof(buf)-1, format, args );
buf[sizeof(buf)-1] = 0;
va_end( args );
throw execution_exception( ec, buf );