]> granicus.if.org Git - apache/commitdiff
If apr_file_read did return APR_EOF, then ensure that,
authorJim Jagielski <jim@apache.org>
Fri, 8 Nov 2013 20:51:44 +0000 (20:51 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 8 Nov 2013 20:51:44 +0000 (20:51 +0000)
as long as we read the right number of bytes, we
return APR_SUCCESS

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1540179 13f79535-47bb-0310-9956-ffa450edef68

modules/slotmem/mod_slotmem_shm.c

index 8f1fcb29ffdff2c6f665db8cacbe4ce8066ca7ea..43c81ef3e30e8c74ea74893b2a49dc6f4dfb9815 100644 (file)
@@ -235,6 +235,7 @@ static apr_status_t restore_slotmem(void *ptr, const char *name, apr_size_t size
         if (rv == APR_SUCCESS) {
             rv = apr_file_read(fp, ptr, &nbytes);
             if ((rv == APR_SUCCESS || rv == APR_EOF) && nbytes == size) {
+                rv = APR_SUCCESS;   /* for successful return @ EOF */
                 /*
                  * if at EOF, don't bother checking md5
                  *  - backwards compatibility