diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2007-10-05 06:56:11 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2007-10-05 06:56:11 +0000 |
commit | 9e3f9e69c1d9d43429234e93acd57782ff227b0a (patch) | |
tree | c404381c2b0f018b65b87ee1e627b3a999a484f9 /mmap | |
parent | 31cc5f4cb4de08cde0dba592433f131e30bfdaef (diff) | |
download | libapr-9e3f9e69c1d9d43429234e93acd57782ff227b0a.tar.gz |
Once we know apr_off_t size > 0, we know we can fold
it, as off_t is signed and size_t is unsigned.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@582097 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'mmap')
-rw-r--r-- | mmap/unix/common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mmap/unix/common.c b/mmap/unix/common.c index a97899288..1172f3c89 100644 --- a/mmap/unix/common.c +++ b/mmap/unix/common.c @@ -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; |