[asterisk-commits] mmichelson: branch group/dns r432487 -	/team/group/dns/main/dns_core.c
    SVN commits to the Asterisk project 
    asterisk-commits at lists.digium.com
       
    Thu Mar  5 10:46:58 CST 2015
    
    
  
Author: mmichelson
Date: Thu Mar  5 10:46:57 2015
New Revision: 432487
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=432487
Log:
Fix bug where a NULL canonical name in a DNS result would cause a crash.
Modified:
    team/group/dns/main/dns_core.c
Modified: team/group/dns/main/dns_core.c
URL: http://svnview.digium.com/svn/asterisk/team/group/dns/main/dns_core.c?view=diff&rev=432487&r1=432486&r2=432487
==============================================================================
--- team/group/dns/main/dns_core.c (original)
+++ team/group/dns/main/dns_core.c Thu Mar  5 10:46:57 2015
@@ -368,6 +368,12 @@
 		return -1;
 	}
 
+	if (ast_strlen_zero(canonical)) {
+		ast_debug(2, "Query '%p': Could not set result information since no canonical name was provided\n",
+			query);
+		return -1;
+	}
+
 	if (query->result) {
 		ast_dns_result_free(query->result);
 	}
    
    
More information about the asterisk-commits
mailing list