comparison src/core/ngx_resolver.c @ 6355:c36482d0a79f stable-1.8

Resolver: fixed possible segmentation fault on DNS format error.
author Roman Arutyunyan <arut@nginx.com>
date Tue, 26 Jan 2016 16:46:18 +0300
parents 5004210e8c78
children f63dd04c1580
comparison
equal deleted inserted replaced
6346:e9a4531a2a5d 6355:c36482d0a79f
1290 if (code == NGX_RESOLVE_FORMERR) { 1290 if (code == NGX_RESOLVE_FORMERR) {
1291 1291
1292 times = 0; 1292 times = 0;
1293 1293
1294 for (q = ngx_queue_head(&r->name_resend_queue); 1294 for (q = ngx_queue_head(&r->name_resend_queue);
1295 q != ngx_queue_sentinel(&r->name_resend_queue) || times++ < 100; 1295 q != ngx_queue_sentinel(&r->name_resend_queue) && times++ < 100;
1296 q = ngx_queue_next(q)) 1296 q = ngx_queue_next(q))
1297 { 1297 {
1298 rn = ngx_queue_data(q, ngx_resolver_node_t, queue); 1298 rn = ngx_queue_data(q, ngx_resolver_node_t, queue);
1299 qident = (rn->query[0] << 8) + rn->query[1]; 1299 qident = (rn->query[0] << 8) + rn->query[1];
1300 1300