[nginx] Resolver: fixed possible segmentation fault on DNS forma...
Maxim Dounin
mdounin at mdounin.ru
Tue Jan 26 16:27:14 UTC 2016
details: http://hg.nginx.org/nginx/rev/81d44cd4044e
branches:
changeset: 6347:81d44cd4044e
user: Roman Arutyunyan <arut at nginx.com>
date: Tue Jan 26 16:46:18 2016 +0300
description:
Resolver: fixed possible segmentation fault on DNS format error.
diffstat:
src/core/ngx_resolver.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff --git a/src/core/ngx_resolver.c b/src/core/ngx_resolver.c
--- a/src/core/ngx_resolver.c
+++ b/src/core/ngx_resolver.c
@@ -1312,7 +1312,7 @@ ngx_resolver_process_response(ngx_resolv
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);
More information about the nginx-devel
mailing list