Return-Path: Delivered-To: apmail-incubator-stdcxx-commits-archive@www.apache.org Received: (qmail 3726 invoked from network); 22 Oct 2007 14:59:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Oct 2007 14:59:38 -0000 Received: (qmail 24650 invoked by uid 500); 22 Oct 2007 14:59:26 -0000 Delivered-To: apmail-incubator-stdcxx-commits-archive@incubator.apache.org Received: (qmail 24626 invoked by uid 500); 22 Oct 2007 14:59:26 -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 24615 invoked by uid 99); 22 Oct 2007 14:59:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Oct 2007 07:59:26 -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; Mon, 22 Oct 2007 14:59:38 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 41B571A9832; Mon, 22 Oct 2007 07:59:17 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r587119 - /incubator/stdcxx/branches/4.2.x/tests/src/printf.cpp Date: Mon, 22 Oct 2007 14:59:16 -0000 To: stdcxx-commits@incubator.apache.org From: faridz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071022145917.41B571A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 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;