mirror of
https://github.com/nginx/nginx.git
synced 2024-12-02 20:09:01 +08:00
Added three missing checks for NULL after ngx_array_push() calls.
Found by Coverity.
This commit is contained in:
parent
2af80d5fab
commit
86dd5bde45
@ -1626,6 +1626,9 @@ ngx_http_fastcgi_process_header(ngx_http_request_t *r)
|
||||
}
|
||||
|
||||
part = ngx_array_push(f->split_parts);
|
||||
if (part == NULL) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
part->start = part_start;
|
||||
part->end = part_end;
|
||||
|
@ -721,6 +721,10 @@ ngx_http_limit_conn(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
}
|
||||
|
||||
limit = ngx_array_push(&lccf->limits);
|
||||
if (limit == NULL) {
|
||||
return NGX_CONF_ERROR;
|
||||
}
|
||||
|
||||
limit->conn = n;
|
||||
limit->shm_zone = shm_zone;
|
||||
|
||||
|
@ -937,6 +937,9 @@ ngx_http_limit_req(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
}
|
||||
|
||||
limit = ngx_array_push(&lrcf->limits);
|
||||
if (limit == NULL) {
|
||||
return NGX_CONF_ERROR;
|
||||
}
|
||||
|
||||
limit->shm_zone = shm_zone;
|
||||
limit->burst = burst * 1000;
|
||||
|
Loading…
Reference in New Issue
Block a user