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

        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;


Reply via email to