stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r557418 - /incubator/stdcxx/trunk/tests/src/printf.cpp
Date Wed, 18 Jul 2007 22:29:53 GMT
Author: sebor
Date: Wed Jul 18 15:29:49 2007
New Revision: 557418

URL: http://svn.apache.org/viewvc?view=rev&rev=557418
Log:
2007-07-18  Martin Sebor  <sebor@roguewave.com>

	* printf.cpp (rw_sprintf): Copied the entire string including
	the terminating NUL to the destination buffer.

Modified:
    incubator/stdcxx/trunk/tests/src/printf.cpp

Modified: incubator/stdcxx/trunk/tests/src/printf.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/src/printf.cpp?view=diff&rev=557418&r1=557417&r2=557418
==============================================================================
--- incubator/stdcxx/trunk/tests/src/printf.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/printf.cpp Wed Jul 18 15:29:49 2007
@@ -3339,7 +3339,7 @@
     va_end (va);
 
     if (-1 < nchars)
-        memcpy (buf, tmpbuf, size_t (nchars));
+        memcpy (buf, tmpbuf, size_t (nchars + 1 /* NUL */));
 
     free (tmpbuf);
 



Mime
View raw message