stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From far...@apache.org
Subject svn commit: r585116 - /incubator/stdcxx/trunk/tests/src/printf.cpp
Date Tue, 16 Oct 2007 11:15:05 GMT
Author: faridz
Date: Tue Oct 16 04:15:03 2007
New Revision: 585116

URL: http://svn.apache.org/viewvc?rev=585116&view=rev
Log:
2007-10-16 Travis Vitek <vitek@roguewave.com>

	STDCXX-596
	* 0.printf.cpp (_rw_fmtarray): Check pointer bounds before
	examining the contents to avoid uninitialized memory read.

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?rev=585116&r1=585115&r2=585116&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/src/printf.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/printf.cpp Tue Oct 16 04:15:03 2007
@@ -2006,7 +2006,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;



Mime
View raw message