Resolver: fixed possible segmentation fault on DNS format error.
This commit is contained in:
parent
4bcb833c89
commit
824eae78fb
|
@ -1292,7 +1292,7 @@ ngx_resolver_process_response(ngx_resolver_t *r, u_char *buf, size_t n)
|
||||||
times = 0;
|
times = 0;
|
||||||
|
|
||||||
for (q = ngx_queue_head(&r->name_resend_queue);
|
for (q = ngx_queue_head(&r->name_resend_queue);
|
||||||
q != ngx_queue_sentinel(&r->name_resend_queue) || times++ < 100;
|
q != ngx_queue_sentinel(&r->name_resend_queue) && times++ < 100;
|
||||||
q = ngx_queue_next(q))
|
q = ngx_queue_next(q))
|
||||||
{
|
{
|
||||||
rn = ngx_queue_data(q, ngx_resolver_node_t, queue);
|
rn = ngx_queue_data(q, ngx_resolver_node_t, queue);
|
||||||
|
|
Loading…
Reference in New Issue