[nginx] svn commit: r4644 - trunk/src/core
ru at nginx.com
ru at nginx.com
Tue May 22 13:12:16 UTC 2012
Author: ru
Date: 2012-05-22 13:12:14 +0000 (Tue, 22 May 2012)
New Revision: 4644
URL: http://trac.nginx.org/nginx/changeset/4644/nginx
Log:
Fixed potential null pointer dereference in ngx_resolver_create().
While here, improved error message.
Modified:
trunk/src/core/ngx_resolver.c
Modified: trunk/src/core/ngx_resolver.c
===================================================================
--- trunk/src/core/ngx_resolver.c 2012-05-21 10:55:10 UTC (rev 4643)
+++ trunk/src/core/ngx_resolver.c 2012-05-22 13:12:14 UTC (rev 4644)
@@ -175,7 +175,12 @@
u.port = 53;
if (ngx_inet_resolve_host(cf->pool, &u) != NGX_OK) {
- ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "%V: %s", &u.host, u.err);
+ if (u.err) {
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "%s in resolver \"%V\"",
+ u.err, &u.host);
+ }
+
return NULL;
}
More information about the nginx-devel
mailing list