[nginx] svn commit: r4716 - in branches/stable-1.2: . src/core

mdounin at mdounin.ru mdounin at mdounin.ru
Mon Jul 2 15:35:22 UTC 2012


Author: mdounin
Date: 2012-07-02 15:35:22 +0000 (Mon, 02 Jul 2012)
New Revision: 4716
URL: http://trac.nginx.org/nginx/changeset/4716/nginx

Log:
Merge of r4644:

Fixed potential null pointer dereference in ngx_resolver_create().
While here, improved error message.


Modified:
   branches/stable-1.2/
   branches/stable-1.2/src/core/ngx_resolver.c

Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2	2012-07-02 15:33:35 UTC (rev 4715)
+++ branches/stable-1.2	2012-07-02 15:35:22 UTC (rev 4716)

Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4643,4645,4674-4676
+/trunk:4611-4632,4636-4645,4674-4676
\ No newline at end of property
Modified: branches/stable-1.2/src/core/ngx_resolver.c
===================================================================
--- branches/stable-1.2/src/core/ngx_resolver.c	2012-07-02 15:33:35 UTC (rev 4715)
+++ branches/stable-1.2/src/core/ngx_resolver.c	2012-07-02 15:35:22 UTC (rev 4716)
@@ -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