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 87841CCCD for ; Mon, 30 Apr 2012 03:14:16 +0000 (UTC) Received: (qmail 75088 invoked by uid 500); 30 Apr 2012 03:14:16 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 74981 invoked by uid 500); 30 Apr 2012 03:14:15 -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 74946 invoked by uid 99); 30 Apr 2012 03:14:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Apr 2012 03:14:14 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Apr 2012 03:14:13 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1FEC923889E3; Mon, 30 Apr 2012 03:13:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1332050 - /subversion/trunk/subversion/libsvn_delta/editor.c Date: Mon, 30 Apr 2012 03:13:53 -0000 To: commits@subversion.apache.org From: gstein@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120430031353.1FEC923889E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gstein Date: Mon Apr 30 03:13:52 2012 New Revision: 1332050 URL: http://svn.apache.org/viewvc?rev=1332050&view=rev Log: Add more assertions for safety. * subversion/libsvn_delta/editor.c: (svn_editor_copy, svn_editor_move): the source revision must be valid Modified: subversion/trunk/subversion/libsvn_delta/editor.c Modified: subversion/trunk/subversion/libsvn_delta/editor.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/editor.c?rev=1332050&r1=1332049&r2=1332050&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_delta/editor.c (original) +++ subversion/trunk/subversion/libsvn_delta/editor.c Mon Apr 30 03:13:52 2012 @@ -694,6 +694,7 @@ svn_editor_copy(svn_editor_t *editor, svn_error_t *err = SVN_NO_ERROR; SVN_ERR_ASSERT(svn_relpath_is_canonical(src_relpath)); + SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(src_revision)); SVN_ERR_ASSERT(svn_relpath_is_canonical(dst_relpath)); SHOULD_NOT_BE_FINISHED(editor); SHOULD_ALLOW_ADD(editor, dst_relpath); @@ -727,6 +728,7 @@ svn_editor_move(svn_editor_t *editor, svn_error_t *err = SVN_NO_ERROR; SVN_ERR_ASSERT(svn_relpath_is_canonical(src_relpath)); + SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(src_revision)); SVN_ERR_ASSERT(svn_relpath_is_canonical(dst_relpath)); SHOULD_NOT_BE_FINISHED(editor); SHOULD_NOT_BE_COMPLETED(editor, src_relpath);