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 A71BB787E for ; Fri, 28 Oct 2011 20:49:06 +0000 (UTC) Received: (qmail 6076 invoked by uid 500); 28 Oct 2011 20:49:06 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 6054 invoked by uid 500); 28 Oct 2011 20:49:06 -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 6047 invoked by uid 99); 28 Oct 2011 20:49:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Oct 2011 20:49:06 +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; Fri, 28 Oct 2011 20:49:02 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 441E32388A32 for ; Fri, 28 Oct 2011 20:48:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1190559 - /subversion/branches/integrate-string-improvements/subversion/libsvn_delta/svndiff.c Date: Fri, 28 Oct 2011 20:48:41 -0000 To: commits@subversion.apache.org From: stefan2@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111028204841.441E32388A32@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: stefan2 Date: Fri Oct 28 20:48:40 2011 New Revision: 1190559 URL: http://svn.apache.org/viewvc?rev=1190559&view=rev Log: Comment change only. * subversion/libsvn_delta/svndiff.c (zlib_decode): make clear that we may simply return the input buffer (decode_window): add a similar note in the caller Modified: subversion/branches/integrate-string-improvements/subversion/libsvn_delta/svndiff.c Modified: subversion/branches/integrate-string-improvements/subversion/libsvn_delta/svndiff.c URL: http://svn.apache.org/viewvc/subversion/branches/integrate-string-improvements/subversion/libsvn_delta/svndiff.c?rev=1190559&r1=1190558&r2=1190559&view=diff ============================================================================== --- subversion/branches/integrate-string-improvements/subversion/libsvn_delta/svndiff.c (original) +++ subversion/branches/integrate-string-improvements/subversion/libsvn_delta/svndiff.c Fri Oct 28 20:48:40 2011 @@ -434,8 +434,11 @@ decode_size(apr_size_t *val, /* Decode the possibly-zlib compressed string of length INLEN that is in IN, into OUT. We expect an integer is prepended to IN that specifies the original size, and that if encoded size == original size, that the - remaining data is not compressed. An error is returned if the decoded - length exceeds the given LIMIT.*/ + remaining data is not compressed. + In that case, we will simply return pointer into IN as data pointer for + OUT. The caller is expected not to modify the contents of OUT. + An error is returned if the decoded length exceeds the given LIMIT. + */ static svn_error_t * zlib_decode(const unsigned char *in, apr_size_t inLen, svn_stringbuf_t *out, apr_size_t limit) @@ -634,6 +637,8 @@ decode_window(svn_txdelta_window_t *wind svn_stringbuf_t *instout = svn_stringbuf_create_empty(pool); svn_stringbuf_t *ndout = svn_stringbuf_create_empty(pool); + /* these may in fact simply return references to insend */ + SVN_ERR(zlib_decode(insend, newlen, ndout, SVN_DELTA_WINDOW_SIZE)); SVN_ERR(zlib_decode(data, insend - data, instout,