summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjim <jim@13f79535-47bb-0310-9956-ffa450edef68>2014-01-26 22:04:09 +0000
committerjim <jim@13f79535-47bb-0310-9956-ffa450edef68>2014-01-26 22:04:09 +0000
commit98e7e9262c5ff35b95690034601c10ec49f08447 (patch)
treedb27d20ca819b82dc0c0b02637e3d40a92d7a502
parent416ff3ff5abbe4fe06a2d2e8085667bb99a9bac6 (diff)
downloadlibapr-98e7e9262c5ff35b95690034601c10ec49f08447.tar.gz
Merge r1561555 from trunk:
Ahh... found a testcase which req's this. FIX data corruption Reviewed/backported by: jim git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1561557 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--shmem/unix/shm.c3
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 */