summaryrefslogtreecommitdiff
path: root/modules/slotmem
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2018-05-20 12:19:13 +0000
committerYann Ylavic <ylavic@apache.org>2018-05-20 12:19:13 +0000
commit8f9833972fd5d2c3ee8f82cef99aec6741f49f15 (patch)
tree140c4bf67e23ece00c0191b9a75372a2794c0f24 /modules/slotmem
parent13d4c252947c621f338653814c8c22490fd30fcb (diff)
downloadhttpd-8f9833972fd5d2c3ee8f82cef99aec6741f49f15.tar.gz
mod_slotmem_shm: follow up to r1831869: fix persisted file size's checksum.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1831935 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/slotmem')
-rw-r--r--modules/slotmem/mod_slotmem_shm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/slotmem/mod_slotmem_shm.c b/modules/slotmem/mod_slotmem_shm.c
index 708eaf9d78..8979a9d6d1 100644
--- a/modules/slotmem/mod_slotmem_shm.c
+++ b/modules/slotmem/mod_slotmem_shm.c
@@ -200,7 +200,7 @@ static apr_status_t restore_slotmem(sharedslotdesc_t *desc,
apr_file_t *fp;
apr_status_t rv = APR_ENOTIMPL;
void *ptr = (char *)desc + AP_SLOTMEM_OFFSET;
- apr_size_t dsize = size - AP_SLOTMEM_OFFSET;
+ apr_size_t nbytes = size - AP_SLOTMEM_OFFSET;
unsigned char digest[APR_MD5_DIGESTSIZE];
unsigned char digest2[APR_MD5_DIGESTSIZE];
char desc_buf[AP_SLOTMEM_OFFSET];
@@ -212,7 +212,7 @@ static apr_status_t restore_slotmem(sharedslotdesc_t *desc,
rv = apr_file_open(&fp, storename, APR_READ | APR_WRITE, APR_OS_DEFAULT,
pool);
if (rv == APR_SUCCESS) {
- rv = apr_file_read_full(fp, ptr, dsize, NULL);
+ rv = apr_file_read_full(fp, ptr, nbytes, NULL);
if (rv == APR_SUCCESS || rv == APR_EOF) {
rv = APR_SUCCESS; /* for successful return @ EOF */
/*
@@ -222,7 +222,7 @@ static apr_status_t restore_slotmem(sharedslotdesc_t *desc,
if (apr_file_eof(fp) != APR_EOF) {
rv = apr_file_read_full(fp, digest, APR_MD5_DIGESTSIZE, NULL);
if (rv == APR_SUCCESS || rv == APR_EOF) {
- apr_md5(digest2, ptr, APR_MD5_DIGESTSIZE);
+ apr_md5(digest2, ptr, nbytes);
if (memcmp(digest, digest2, APR_MD5_DIGESTSIZE)) {
rv = APR_EMISMATCH;
}