Loading modules/cache/mod_file_cache.c +10 −3 Original line number Diff line number Diff line Loading @@ -206,6 +206,11 @@ static void cache_the_file(cmd_parms *cmd, const char *filename, int mmap) "mod_file_cache: %s isn't a regular file, skipping", fspec); return; } if (tmp.finfo.size > AP_MAX_SENDFILE) { ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, cmd->server, "mod_file_cache: %s is too large to cache, skipping", fspec); return; } rc = apr_file_open(&fd, fspec, APR_READ | APR_BINARY | APR_XTHREAD, APR_OS_DEFAULT, cmd->pool); Loading @@ -226,7 +231,8 @@ static void cache_the_file(cmd_parms *cmd, const char *filename, int mmap) * XXX: APR_HAS_LARGE_FILES issue; need to reject this request if * size is greater than MAX(apr_size_t) (perhaps greater than 1M?). */ if ((rc = apr_mmap_create(&new_file->mm, fd, 0, new_file->finfo.size, if ((rc = apr_mmap_create(&new_file->mm, fd, 0, (apr_size_t)new_file->finfo.size, APR_MMAP_READ, cmd->pool)) != APR_SUCCESS) { apr_file_close(fd); ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server, Loading Loading @@ -327,7 +333,7 @@ static int mmap_handler(request_rec *r, a_file *file) apr_bucket *b; apr_bucket_brigade *bb = apr_brigade_create(r->pool); b = apr_bucket_mmap_create(file->mm, 0, file->finfo.size); b = apr_bucket_mmap_create(file->mm, 0, (apr_size_t)file->finfo.size); APR_BRIGADE_INSERT_TAIL(bb, b); b = apr_bucket_eos_create(); APR_BRIGADE_INSERT_TAIL(bb, b); Loading @@ -344,7 +350,8 @@ static int sendfile_handler(request_rec *r, a_file *file) apr_bucket *b; apr_bucket_brigade *bb = apr_brigade_create(r->pool); b = apr_bucket_file_create(file->file, 0, file->finfo.size, r->pool); b = apr_bucket_file_create(file->file, 0, (apr_size_t)file->finfo.size, r->pool); APR_BRIGADE_INSERT_TAIL(bb, b); b = apr_bucket_eos_create(); APR_BRIGADE_INSERT_TAIL(bb, b); Loading modules/dav/fs/lock.c +10 −2 Original line number Diff line number Diff line Loading @@ -845,8 +845,16 @@ static dav_error * dav_fs_load_locknull_list(apr_pool_t *p, const char *dirpath, goto loaderror; } dav_set_bufsize(p, pbuf, finfo.size); amt = finfo.size; if (finfo.size != (apr_size_t)finfo.size) { err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, apr_psprintf(p, "Opened but rejected huge file %s", pbuf->buf)); goto loaderror; } amt = (apr_size_t)finfo.size; dav_set_bufsize(p, pbuf, amt); if (apr_file_read(file, pbuf->buf, &amt) != APR_SUCCESS || amt != finfo.size) { err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, Loading Loading
modules/cache/mod_file_cache.c +10 −3 Original line number Diff line number Diff line Loading @@ -206,6 +206,11 @@ static void cache_the_file(cmd_parms *cmd, const char *filename, int mmap) "mod_file_cache: %s isn't a regular file, skipping", fspec); return; } if (tmp.finfo.size > AP_MAX_SENDFILE) { ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, cmd->server, "mod_file_cache: %s is too large to cache, skipping", fspec); return; } rc = apr_file_open(&fd, fspec, APR_READ | APR_BINARY | APR_XTHREAD, APR_OS_DEFAULT, cmd->pool); Loading @@ -226,7 +231,8 @@ static void cache_the_file(cmd_parms *cmd, const char *filename, int mmap) * XXX: APR_HAS_LARGE_FILES issue; need to reject this request if * size is greater than MAX(apr_size_t) (perhaps greater than 1M?). */ if ((rc = apr_mmap_create(&new_file->mm, fd, 0, new_file->finfo.size, if ((rc = apr_mmap_create(&new_file->mm, fd, 0, (apr_size_t)new_file->finfo.size, APR_MMAP_READ, cmd->pool)) != APR_SUCCESS) { apr_file_close(fd); ap_log_error(APLOG_MARK, APLOG_WARNING, rc, cmd->server, Loading Loading @@ -327,7 +333,7 @@ static int mmap_handler(request_rec *r, a_file *file) apr_bucket *b; apr_bucket_brigade *bb = apr_brigade_create(r->pool); b = apr_bucket_mmap_create(file->mm, 0, file->finfo.size); b = apr_bucket_mmap_create(file->mm, 0, (apr_size_t)file->finfo.size); APR_BRIGADE_INSERT_TAIL(bb, b); b = apr_bucket_eos_create(); APR_BRIGADE_INSERT_TAIL(bb, b); Loading @@ -344,7 +350,8 @@ static int sendfile_handler(request_rec *r, a_file *file) apr_bucket *b; apr_bucket_brigade *bb = apr_brigade_create(r->pool); b = apr_bucket_file_create(file->file, 0, file->finfo.size, r->pool); b = apr_bucket_file_create(file->file, 0, (apr_size_t)file->finfo.size, r->pool); APR_BRIGADE_INSERT_TAIL(bb, b); b = apr_bucket_eos_create(); APR_BRIGADE_INSERT_TAIL(bb, b); Loading
modules/dav/fs/lock.c +10 −2 Original line number Diff line number Diff line Loading @@ -845,8 +845,16 @@ static dav_error * dav_fs_load_locknull_list(apr_pool_t *p, const char *dirpath, goto loaderror; } dav_set_bufsize(p, pbuf, finfo.size); amt = finfo.size; if (finfo.size != (apr_size_t)finfo.size) { err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, apr_psprintf(p, "Opened but rejected huge file %s", pbuf->buf)); goto loaderror; } amt = (apr_size_t)finfo.size; dav_set_bufsize(p, pbuf, amt); if (apr_file_read(file, pbuf->buf, &amt) != APR_SUCCESS || amt != finfo.size) { err = dav_new_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, Loading