Author: faridz
Date: Mon Oct 22 07:59:16 2007
New Revision: 587119
URL: http://svn.apache.org/viewvc?rev=587119&view=rev
Log:
2007-10-22 Farid Zaripov <[EMAIL PROTECTED]>
Merged r585116 from trunk with a fix for STDCXX-596
* 0.printf.cpp (_rw_fmtarray): Check pointer bounds before
examining the contents to avoid uninitialized memory read.
Modified:
incubator/stdcxx/branches/4.2.x/tests/src/printf.cpp
Modified: incubator/stdcxx/branches/4.2.x/tests/src/printf.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.x/tests/src/printf.cpp?rev=587119&r1=587118&r2=587119&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.x/tests/src/printf.cpp (original)
+++ incubator/stdcxx/branches/4.2.x/tests/src/printf.cpp Mon Oct 22 07:59:16
2007
@@ -2009,7 +2009,7 @@
for (const elemT *pelem = last + 1; ; ++pelem) {
- if (*pelem == *last && size_t (pelem - array) < nelems) {
+ if (size_t (pelem - array) < nelems && *pelem == *last) {
// if the last processed element repeats, continue
// until a different element is encountered
continue;