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 <[EMAIL PROTECTED]>
* 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);