You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by ji...@apache.org on 2014/01/26 23:02:57 UTC

svn commit: r1561555 - /apr/apr/trunk/shmem/unix/shm.c

Author: jim
Date: Sun Jan 26 22:02:57 2014
New Revision: 1561555

URL: http://svn.apache.org/r1561555
Log:
Ahh... found a testcase which req's this.
FIX data corruption

Modified:
    apr/apr/trunk/shmem/unix/shm.c

Modified: apr/apr/trunk/shmem/unix/shm.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/shmem/unix/shm.c?rev=1561555&r1=1561554&r2=1561555&view=diff
==============================================================================
--- apr/apr/trunk/shmem/unix/shm.c (original)
+++ apr/apr/trunk/shmem/unix/shm.c Sun Jan 26 22:02:57 2014
@@ -337,8 +337,7 @@ APR_DECLARE(apr_status_t) apr_shm_create
             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 */