Mercurial > hg > nginx
comparison src/http/modules/ngx_http_proxy_module.c @ 7720:a88384c69d1e
Proxy: error checking for array init, missed in 7716:d6a5e14aa3e4.
Found by Coverity (CID 1467637).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 29 Sep 2020 15:54:09 +0300 |
parents | d6a5e14aa3e4 |
children | 485dba3e2a01 |
comparison
equal
deleted
inserted
replaced
7719:c0cacad62cc8 | 7720:a88384c69d1e |
---|---|
2677 ngx_uint_t i; | 2677 ngx_uint_t i; |
2678 ngx_array_t attrs; | 2678 ngx_array_t attrs; |
2679 ngx_keyval_t *attr; | 2679 ngx_keyval_t *attr; |
2680 ngx_http_proxy_loc_conf_t *plcf; | 2680 ngx_http_proxy_loc_conf_t *plcf; |
2681 | 2681 |
2682 ngx_array_init(&attrs, r->pool, 2, sizeof(ngx_keyval_t)); | 2682 if (ngx_array_init(&attrs, r->pool, 2, sizeof(ngx_keyval_t)) != NGX_OK) { |
2683 return NGX_ERROR; | |
2684 } | |
2683 | 2685 |
2684 if (ngx_http_proxy_parse_cookie(&h->value, &attrs) != NGX_OK) { | 2686 if (ngx_http_proxy_parse_cookie(&h->value, &attrs) != NGX_OK) { |
2685 return NGX_ERROR; | 2687 return NGX_ERROR; |
2686 } | 2688 } |
2687 | 2689 |