Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 67663 invoked from network); 5 Oct 2007 06:56:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Oct 2007 06:56:51 -0000 Received: (qmail 52168 invoked by uid 500); 5 Oct 2007 06:56:40 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 52129 invoked by uid 500); 5 Oct 2007 06:56:39 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 52118 invoked by uid 99); 5 Oct 2007 06:56:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2007 23:56:39 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2007 06:56:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 71AE81A983A; Thu, 4 Oct 2007 23:56:30 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r582098 - /apr/apr/branches/1.2.x/mmap/unix/common.c Date: Fri, 05 Oct 2007 06:56:30 -0000 To: commits@apr.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071005065630.71AE81A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: wrowe Date: Thu Oct 4 23:56:29 2007 New Revision: 582098 URL: http://svn.apache.org/viewvc?rev=582098&view=rev Log: Once we know apr_off_t size > 0, we know we can fold it, as off_t is signed and size_t is unsigned. backport; r582097 Modified: apr/apr/branches/1.2.x/mmap/unix/common.c Modified: apr/apr/branches/1.2.x/mmap/unix/common.c URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/mmap/unix/common.c?rev=582098&r1=582097&r2=582098&view=diff ============================================================================== --- apr/apr/branches/1.2.x/mmap/unix/common.c (original) +++ apr/apr/branches/1.2.x/mmap/unix/common.c Thu Oct 4 23:56:29 2007 @@ -32,8 +32,8 @@ APR_DECLARE(apr_status_t) apr_mmap_offset(void **addr, apr_mmap_t *mmap, apr_off_t offset) -{ - if (offset < 0 || offset > mmap->size) +{ + if (offset < 0 || (apr_size_t)offset > mmap->size) return APR_EINVAL; (*addr) = (char *) mmap->mm + offset;