Return-Path: Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: (qmail 75964 invoked from network); 9 Sep 2010 16:29:12 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Sep 2010 16:29:12 -0000 Received: (qmail 83003 invoked by uid 500); 9 Sep 2010 16:29:12 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 82933 invoked by uid 500); 9 Sep 2010 16:29:12 -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 82923 invoked by uid 99); 9 Sep 2010 16:29:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Sep 2010 16:29:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Thu, 09 Sep 2010 16:29:09 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7CEE8238890B; Thu, 9 Sep 2010 16:28:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r995484 - /subversion/trunk/subversion/libsvn_repos/load.c Date: Thu, 09 Sep 2010 16:28:48 -0000 To: commits@subversion.apache.org From: stsp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100909162848.7CEE8238890B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: stsp Date: Thu Sep 9 16:28:48 2010 New Revision: 995484 URL: http://svn.apache.org/viewvc?rev=995484&view=rev Log: * subversion/libsvn_repos/load.c (parse_property_block): Replace two more occurrences of atoi() with svn_cstring_atoi64(), switching to 64bit because size_t isn't guaranteed to be 32bit. Modified: subversion/trunk/subversion/libsvn_repos/load.c Modified: subversion/trunk/subversion/libsvn_repos/load.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/load.c?rev=995484&r1=995483&r2=995484&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_repos/load.c (original) +++ subversion/trunk/subversion/libsvn_repos/load.c Thu Sep 9 16:28:48 2010 @@ -450,9 +450,11 @@ parse_property_block(svn_stream_t *strea else if ((buf[0] == 'K') && (buf[1] == ' ')) { char *keybuf; + apr_int64_t len; + SVN_ERR(svn_cstring_atoi64(&len, buf + 2)); SVN_ERR(read_key_or_val(&keybuf, actual_length, - stream, atoi(buf + 2), proppool)); + stream, (apr_size_t)len, proppool)); /* Read a val length line */ SVN_ERR(svn_stream_readline(stream, &strbuf, "\n", &eof, proppool)); @@ -466,8 +468,10 @@ parse_property_block(svn_stream_t *strea { svn_string_t propstring; char *valbuf; + apr_int64_t val; - propstring.len = atoi(buf + 2); + SVN_ERR(svn_cstring_atoi64(&val, buf + 2)); + propstring.len = (apr_size_t)val; SVN_ERR(read_key_or_val(&valbuf, actual_length, stream, propstring.len, proppool)); propstring.data = valbuf;