svn commit: samba r17242 - in branches: SAMBA_3_0/source/libads SAMBA_3_0_23/source/libads

jerry at samba.org jerry at samba.org
Tue Jul 25 20:11:05 GMT 2006


Author: jerry
Date: 2006-07-25 20:11:03 +0000 (Tue, 25 Jul 2006)
New Revision: 17242

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17242

Log:
BUG 3957: make sure to zero memory in the SRV hostlist in case there is not an A record for each SRV name
Modified:
   branches/SAMBA_3_0/source/libads/dns.c
   branches/SAMBA_3_0_23/source/libads/dns.c


Changeset:
Modified: branches/SAMBA_3_0/source/libads/dns.c
===================================================================
--- branches/SAMBA_3_0/source/libads/dns.c	2006-07-25 20:09:45 UTC (rev 17241)
+++ branches/SAMBA_3_0/source/libads/dns.c	2006-07-25 20:11:03 UTC (rev 17242)
@@ -343,7 +343,7 @@
 	DEBUG(4,("ads_dns_lookup_srv: %d records returned in the answer section.\n", 
 		answer_count));
 		
-	if ( (dcs = TALLOC_ARRAY(ctx, struct dns_rr_srv, answer_count)) == NULL ) {
+	if ( (dcs = TALLOC_ZERO_ARRAY(ctx, struct dns_rr_srv, answer_count)) == NULL ) {
 		DEBUG(0,("ads_dns_lookup_srv: talloc() failure for %d char*'s\n", 
 			answer_count));
 		return NT_STATUS_NO_MEMORY;

Modified: branches/SAMBA_3_0_23/source/libads/dns.c
===================================================================
--- branches/SAMBA_3_0_23/source/libads/dns.c	2006-07-25 20:09:45 UTC (rev 17241)
+++ branches/SAMBA_3_0_23/source/libads/dns.c	2006-07-25 20:11:03 UTC (rev 17242)
@@ -279,7 +279,7 @@
 	DEBUG(4,("ads_dns_lookup_srv: %d records returned in the answer section.\n", 
 		answer_count));
 		
-	if ( (dcs = TALLOC_ARRAY(ctx, struct dns_rr_srv, answer_count)) == NULL ) {
+	if ( (dcs = TALLOC_ZERO_ARRAY(ctx, struct dns_rr_srv, answer_count)) == NULL ) {
 		DEBUG(0,("ads_dns_lookup_srv: talloc() failure for %d char*'s\n", 
 			answer_count));
 		return NT_STATUS_NO_MEMORY;



More information about the samba-cvs mailing list