Klaus Demo nginx / c460629
Merge of r4919: fixed segfault on PUT in dav module. Dav: fixed segfault on PUT if body was already read (ticket #238). If request body reading happens with different options it's possible that there will be no r->request_body->temp_file available (or even no r->request_body available if body was discarded). Return internal server error in this case instead of committing suicide by dereferencing a null pointer. Maxim Dounin 7 years ago
1 changed file(s) with 5 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
208208 ngx_ext_rename_file_t ext;
209209 ngx_http_dav_loc_conf_t *dlcf;
211 if (r->request_body == NULL || r->request_body->temp_file == NULL) {
212 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
213 return;
214 }
211216 ngx_http_map_uri_to_path(r, &path, &root, 0);
213218 path.len--;