svn commit: samba r19080 - in branches/SAMBA_3_0/source/lib: .
vlendec at samba.org
vlendec at samba.org
Wed Oct 4 21:07:06 GMT 2006
Author: vlendec
Date: 2006-10-04 21:07:05 +0000 (Wed, 04 Oct 2006)
New Revision: 19080
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19080
Log:
Fix a potential NULL dereference
Modified:
branches/SAMBA_3_0/source/lib/util.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/util.c
===================================================================
--- branches/SAMBA_3_0/source/lib/util.c 2006-10-04 20:59:06 UTC (rev 19079)
+++ branches/SAMBA_3_0/source/lib/util.c 2006-10-04 21:07:05 UTC (rev 19080)
@@ -312,6 +312,13 @@
{
int i;
+ if ((*num_gids != 0) && (*gids == NULL)) {
+ /*
+ * A former call to this routine has failed to allocate memory
+ */
+ return;
+ }
+
for (i=0; i<*num_gids; i++) {
if ((*gids)[i] == gid)
return;
More information about the samba-cvs
mailing list