lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1591 - nss-pam-ldapd/nslcd

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1591 - nss-pam-ldapd/nslcd



Author: jhrozek
Date: Mon Jan  9 13:07:29 2012
New Revision: 1591
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1591&view=revision

Log:
Check NULL return in write_netgroup()

Modified:
   nss-pam-ldapd/nslcd/netgroup.c

Modified: nss-pam-ldapd/nslcd/netgroup.c
==============================================================================
--- nss-pam-ldapd/nslcd/netgroup.c      Mon Jan  9 13:04:02 2012        (r1590)
+++ nss-pam-ldapd/nslcd/netgroup.c      Mon Jan  9 13:07:29 2012        (r1591)
@@ -214,6 +214,13 @@
   const char **members;
   /* get the netgroup name */
   names=myldap_get_values(entry,attmap_netgroup_cn);
+  if ((names==NULL)||(names[0]==NULL))
+  {
+    log_log(LOG_WARNING,"%s: %s: missing",
+                        myldap_get_dn(entry),attmap_netgroup_cn);
+    return 0;
+  }
+
   for (i=0;(names[i]!=NULL)&&(strcmp(reqname,names[i])!=0);i++)
     /* nothing here */ ;
   if (names[i]==NULL)
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/