svn commit: samba r16323 - in trunk/source/libads: .
jra at samba.org
jra at samba.org
Fri Jun 16 23:14:15 GMT 2006
Author: jra
Date: 2006-06-16 23:14:14 +0000 (Fri, 16 Jun 2006)
New Revision: 16323
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16323
Log:
Klocwork #481., Don't deref null on malloc fail.
Jeremy.
Modified:
trunk/source/libads/ldap.c
Changeset:
Modified: trunk/source/libads/ldap.c
===================================================================
--- trunk/source/libads/ldap.c 2006-06-16 23:14:12 UTC (rev 16322)
+++ trunk/source/libads/ldap.c 2006-06-16 23:14:14 UTC (rev 16323)
@@ -1956,8 +1956,10 @@
return NULL;
}
- memcpy(&strings[*num_strings], new_strings,
- sizeof(*new_strings) * num_new_strings);
+ if (new_strings && num_new_strings) {
+ memcpy(&strings[*num_strings], new_strings,
+ sizeof(*new_strings) * num_new_strings);
+ }
(*num_strings) += num_new_strings;
More information about the samba-cvs
mailing list