lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1752 - in nss-pam-ldapd-0.7.15+squeeze: . nslcd

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

nss-pam-ldapd commit: r1752 - in nss-pam-ldapd-0.7.15+squeeze: . nslcd



Author: arthur
Date: Sat Sep  8 15:09:38 2012
New Revision: 1752
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1752&view=revision

Log:
fix possible NULL pointer dereference (r1591 from 0.8, r1730 from 0.7)

Modified:
   nss-pam-ldapd-0.7.15+squeeze/   (props changed)
   nss-pam-ldapd-0.7.15+squeeze/nslcd/netgroup.c

Modified: nss-pam-ldapd-0.7.15+squeeze/nslcd/netgroup.c
==============================================================================
--- nss-pam-ldapd-0.7.15+squeeze/nslcd/netgroup.c       Sat Sep  8 15:08:51 
2012        (r1751)
+++ nss-pam-ldapd-0.7.15+squeeze/nslcd/netgroup.c       Sat Sep  8 15:09:38 
2012        (r1752)
@@ -209,6 +209,12 @@
   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/