comparison src/os/unix/ngx_readv_chain.c @ 672:f41d4b305d22 NGINX_1_2_0

nginx 1.2.0 *) Bugfix: a segmentation fault might occur in a worker process if the "try_files" directive was used; the bug had appeared in 1.1.19. *) Bugfix: response might be truncated if there were more than IOV_MAX buffers used. *) Bugfix: in the "crop" parameter of the "image_filter" directive. Thanks to Maxim Bublis.
author Igor Sysoev <http://sysoev.ru>
date Mon, 23 Apr 2012 00:00:00 +0400
parents d0f7a625f27c
children
comparison
equal deleted inserted replaced
671:47cb3497fbab 672:f41d4b305d22
69 while (chain) { 69 while (chain) {
70 if (prev == chain->buf->last) { 70 if (prev == chain->buf->last) {
71 iov->iov_len += chain->buf->end - chain->buf->last; 71 iov->iov_len += chain->buf->end - chain->buf->last;
72 72
73 } else { 73 } else {
74 if (vec.nelts >= IOV_MAX) {
75 break;
76 }
77
74 iov = ngx_array_push(&vec); 78 iov = ngx_array_push(&vec);
75 if (iov == NULL) { 79 if (iov == NULL) {
76 return NGX_ERROR; 80 return NGX_ERROR;
77 } 81 }
78 82
193 while (chain) { 197 while (chain) {
194 if (prev == chain->buf->last) { 198 if (prev == chain->buf->last) {
195 iov->iov_len += chain->buf->end - chain->buf->last; 199 iov->iov_len += chain->buf->end - chain->buf->last;
196 200
197 } else { 201 } else {
202 if (vec.nelts >= IOV_MAX) {
203 break;
204 }
205
198 iov = ngx_array_push(&vec); 206 iov = ngx_array_push(&vec);
199 if (iov == NULL) { 207 if (iov == NULL) {
200 return NGX_ERROR; 208 return NGX_ERROR;
201 } 209 }
202 210