From commits-return-46519-apmail-subversion-commits-archive=subversion.apache.org@subversion.apache.org Fri Feb 3 08:50:34 2017 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 37FCE1944E for ; Fri, 3 Feb 2017 08:50:34 +0000 (UTC) Received: (qmail 1167 invoked by uid 500); 3 Feb 2017 08:50:34 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 1130 invoked by uid 500); 3 Feb 2017 08:50:34 -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 1120 invoked by uid 99); 3 Feb 2017 08:50:33 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2017 08:50:33 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 6F5053A0ABA for ; Fri, 3 Feb 2017 08:50:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1781507 - /subversion/trunk/subversion/libsvn_repos/dump.c Date: Fri, 03 Feb 2017 08:50:33 -0000 To: commits@subversion.apache.org From: stsp@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170203085033.6F5053A0ABA@svn01-us-west.apache.org> Author: stsp Date: Fri Feb 3 08:50:33 2017 New Revision: 1781507 URL: http://svn.apache.org/viewvc?rev=1781507&view=rev Log: Fix a NULL deref in libsvn_repos which makes svndumpfilter crash. * subversion/libsvn_repos/dump.c (svn_repos__dump_revision_record): Don't try to print a Content-length header if propstring is NULL. Reported by: Steven Barbaglia https://svn.haxx.se/users/archive-2017-02/0012.shtml Modified: subversion/trunk/subversion/libsvn_repos/dump.c Modified: subversion/trunk/subversion/libsvn_repos/dump.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/dump.c?rev=1781507&r1=1781506&r2=1781507&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_repos/dump.c (original) +++ subversion/trunk/subversion/libsvn_repos/dump.c Fri Feb 3 08:50:33 2017 @@ -546,11 +546,15 @@ svn_repos__dump_revision_record(svn_stre "%" APR_SIZE_T_FMT, propstring->len)); } - /* Write out a regular Content-length header for the benefit of - non-Subversion RFC-822 parsers. */ - svn_hash_sets(headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH, - apr_psprintf(scratch_pool, - "%" APR_SIZE_T_FMT, propstring->len)); + if (propstring) + { + /* Write out a regular Content-length header for the benefit of + non-Subversion RFC-822 parsers. */ + svn_hash_sets(headers, SVN_REPOS_DUMPFILE_CONTENT_LENGTH, + apr_psprintf(scratch_pool, + "%" APR_SIZE_T_FMT, propstring->len)); + } + SVN_ERR(write_revision_headers(dump_stream, headers, scratch_pool)); /* End of headers */