svn commit: samba r19081 - in branches/SAMBA_3_0_23/source/lib: .
jra at samba.org
jra at samba.org
Wed Oct 4 21:45:44 GMT 2006
Author: jra
Date: 2006-10-04 21:45:43 +0000 (Wed, 04 Oct 2006)
New Revision: 19081
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19081
Log:
Merge from vl: Fix a potential NULL dereference
Modified:
branches/SAMBA_3_0_23/source/lib/util.c
Changeset:
Modified: branches/SAMBA_3_0_23/source/lib/util.c
===================================================================
--- branches/SAMBA_3_0_23/source/lib/util.c 2006-10-04 21:07:05 UTC (rev 19080)
+++ branches/SAMBA_3_0_23/source/lib/util.c 2006-10-04 21:45:43 UTC (rev 19081)
@@ -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