From stdcxx-commits-return-1949-apmail-incubator-stdcxx-commits-archive=incubator.apache.org@incubator.apache.org Tue Oct 16 11:15:57 2007 Return-Path: Delivered-To: apmail-incubator-stdcxx-commits-archive@www.apache.org Received: (qmail 63097 invoked from network); 16 Oct 2007 11:15:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Oct 2007 11:15:57 -0000 Received: (qmail 33588 invoked by uid 500); 16 Oct 2007 11:15:45 -0000 Delivered-To: apmail-incubator-stdcxx-commits-archive@incubator.apache.org Received: (qmail 33570 invoked by uid 500); 16 Oct 2007 11:15:45 -0000 Mailing-List: contact stdcxx-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-commits@incubator.apache.org Received: (qmail 33557 invoked by uid 99); 16 Oct 2007 11:15:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Oct 2007 04:15:44 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Oct 2007 11:15:56 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 745B01A9832; Tue, 16 Oct 2007 04:15:06 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r585116 - /incubator/stdcxx/trunk/tests/src/printf.cpp Date: Tue, 16 Oct 2007 11:15:05 -0000 To: stdcxx-commits@incubator.apache.org From: faridz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071016111506.745B01A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 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;