Resolver: fixed possible segmentation fault on DNS format error.

This commit is contained in:
Roman Arutyunyan 2016-01-26 16:46:18 +03:00
parent 4bcb833c89
commit 824eae78fb
1 changed files with 1 additions and 1 deletions

View File

@ -1292,7 +1292,7 @@ ngx_resolver_process_response(ngx_resolver_t *r, u_char *buf, size_t n)
times = 0;
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))
{
rn = ngx_queue_data(q, ngx_resolver_node_t, queue);