Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50322 - trunk/boost/test/impl
From: gennadiy.rozental_at_[hidden]
Date: 2008-12-19 02:54:59


Author: rogeeff
Date: 2008-12-19 02:54:58 EST (Fri, 19 Dec 2008)
New Revision: 50322
URL: http://svn.boost.org/trac/boost/changeset/50322

Log:
prevent non-null terminated string #2564
Text files modified:
   trunk/boost/test/impl/execution_monitor.ipp | 4 +++-
   1 files changed, 3 insertions(+), 1 deletions(-)

Modified: trunk/boost/test/impl/execution_monitor.ipp
==============================================================================
--- trunk/boost/test/impl/execution_monitor.ipp (original)
+++ trunk/boost/test/impl/execution_monitor.ipp 2008-12-19 02:54:58 EST (Fri, 19 Dec 2008)
@@ -200,7 +200,9 @@
     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 );


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk