Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0903B72D4 for ; Sun, 13 Nov 2011 13:43:57 +0000 (UTC) Received: (qmail 9979 invoked by uid 500); 13 Nov 2011 13:43:56 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 9881 invoked by uid 500); 13 Nov 2011 13:43:56 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 9874 invoked by uid 99); 13 Nov 2011 13:43:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Nov 2011 13:43:56 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [66.111.4.26] (HELO out2.smtp.messagingengine.com) (66.111.4.26) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Nov 2011 13:43:52 +0000 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 3EE4A210E9 for ; Sun, 13 Nov 2011 08:43:31 -0500 (EST) Received: from web4.nyi.mail.srv.osa ([10.202.2.214]) by compute1.internal (MEProxy); Sun, 13 Nov 2011 08:43:31 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=message-id:from:to:cc:mime-version :content-transfer-encoding:content-type:references:subject :in-reply-to:date; s=mesmtp; bh=1JbjZyHUHe5nRUYe1sCvI8FeZHM=; b= R19wHCrds+Yzcb0zdPnpLxdgxu8CBg0H3uG07JyZNI0t8E/G0xh/2Ey7L7xZHL0a eMDivcoAOJ25OqXPzqsRUE243mGV0aJbazhbsOVNzYi8izJ1WsagqshLa1DWDmga JzPsUCuPEoxBfgmcntAKkBltvaX2dnJJ0WcOQGN9xrE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:from:to:cc:mime-version :content-transfer-encoding:content-type:references:subject :in-reply-to:date; s=smtpout; bh=1JbjZyHUHe5nRUYe1sCvI8FeZHM=; b= aY6stVcpXHC9wwWuzKHHDmIudpulk8n+Tev0BtxCQbr4uvWj0VCerfCHRwvqUd96 UwPktMwgb6Sz4qr6+y5gtriLcm2GAWt5zxJP0iiLr6nrt4UynkY722F15Hi7VXWF 2IdISJUIkiOe0xmfUNyUSrtP7Dcc9PMUiRfvZtHI6Qw= Received: by web4.nyi.mail.srv.osa (Postfix, from userid 99) id 183E83C1E8F; Sun, 13 Nov 2011 08:43:31 -0500 (EST) Message-Id: <1321191811.10712.140660998285445@webmail.messagingengine.com> X-Sasl-Enc: VmFYsFvjudRS3+N5Os922OkRKkt6uF5A9nQYc9X3jtuF 1321191811 From: "Daniel Shahaf" To: dev@subversion.apache.org Cc: commits@subversion.apache.org, philip@apache.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii" X-Mailer: MessagingEngine.com Webmail Interface References: <20111111180752.6FDE32388978@eris.apache.org> Subject: Re: svn commit: r1201002 - /subversion/trunk/subversion/libsvn_diff/diff_file.c In-Reply-To: <20111111180752.6FDE32388978@eris.apache.org> Date: Sun, 13 Nov 2011 15:43:31 +0200 On Friday, November 11, 2011 6:07 PM, philip@apache.org wrote: > Author: philip > Date: Fri Nov 11 18:07:52 2011 > New Revision: 1201002 > > URL: http://svn.apache.org/viewvc?rev=1201002&view=rev > Log: > Fix an unitialised memory read identified by valgrind. This occurs > during merge_tests.py 35. > > * subversion/libsvn_diff/diff_file.c > (find_identical_prefix): Don't look beyond endp. > > Modified: > subversion/trunk/subversion/libsvn_diff/diff_file.c > > Modified: subversion/trunk/subversion/libsvn_diff/diff_file.c > URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/diff_file.c?rev=1201002&r1=1201001&r2=1201002&view=diff > ============================================================================== > --- subversion/trunk/subversion/libsvn_diff/diff_file.c (original) > +++ subversion/trunk/subversion/libsvn_diff/diff_file.c Fri Nov 11 18:07:52 2011 > @@ -470,8 +470,9 @@ find_identical_prefix(svn_boolean_t *rea > too many for the \r. */ > svn_boolean_t ended_at_nonmatching_newline = FALSE; > for (i = 0; i < file_len; i++) > - ended_at_nonmatching_newline = ended_at_nonmatching_newline > - || *file[i].curp == '\n'; > + if (file[i].curp < file[i].endp) > + ended_at_nonmatching_newline = ended_at_nonmatching_newline > + || *file[i].curp == '\n'; Does the comment saying: * Determine how far we may advance with chunky ops without reaching * endp for any of the files. needs to be updated? (s/reaching/exceeding/) > if (ended_at_nonmatching_newline) > { > lines--; > > >