diff options
author | Jim Jagielski <jim@apache.org> | 2014-01-26 22:04:09 +0000 |
---|---|---|
committer | Jim Jagielski <jim@apache.org> | 2014-01-26 22:04:09 +0000 |
commit | aa6e629f3dbc5210f6be5d2c25d27b1ba7655394 (patch) | |
tree | db27d20ca819b82dc0c0b02637e3d40a92d7a502 /shmem | |
parent | a9316e17a6c97b20d8e5052dd4a1fd3d55d142b1 (diff) | |
download | apr-aa6e629f3dbc5210f6be5d2c25d27b1ba7655394.tar.gz |
Merge r1561555 from trunk:
Ahh... found a testcase which req's this.
FIX data corruption
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1561557 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'shmem')
-rw-r--r-- | shmem/unix/shm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/shmem/unix/shm.c b/shmem/unix/shm.c index a4f6d6afb..f102b4b35 100644 --- a/shmem/unix/shm.c +++ b/shmem/unix/shm.c @@ -337,8 +337,7 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m, shm_unlink(shm_name); /* we're failing, remove the object */ return status; } - /* TODO: should we use new_m->realsize instead of reqsize ?? */ - new_m->base = mmap(NULL, reqsize, PROT_READ | PROT_WRITE, + new_m->base = mmap(NULL, new_m->realsize, PROT_READ | PROT_WRITE, MAP_SHARED, tmpfd, 0); /* FIXME: check for errors */ |