mirror of
https://github.com/nginx/nginx.git
synced 2025-06-13 14:32:42 +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);
|
part = ngx_array_push(f->split_parts);
|
||||||
|
if (part == NULL) {
|
||||||
|
return NGX_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
part->start = part_start;
|
part->start = part_start;
|
||||||
part->end = part_end;
|
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);
|
limit = ngx_array_push(&lccf->limits);
|
||||||
|
if (limit == NULL) {
|
||||||
|
return NGX_CONF_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
limit->conn = n;
|
limit->conn = n;
|
||||||
limit->shm_zone = shm_zone;
|
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);
|
limit = ngx_array_push(&lrcf->limits);
|
||||||
|
if (limit == NULL) {
|
||||||
|
return NGX_CONF_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
limit->shm_zone = shm_zone;
|
limit->shm_zone = shm_zone;
|
||||||
limit->burst = burst * 1000;
|
limit->burst = burst * 1000;
|
||||||
|
Loading…
Reference in New Issue
Block a user