lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1730 - in nss-pam-ldapd-0.7: . nslcd

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

nss-pam-ldapd commit: r1730 - in nss-pam-ldapd-0.7: . nslcd



Author: arthur
Date: Mon Jul 23 23:16:54 2012
New Revision: 1730
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=1730&view=revision

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

Modified:
   nss-pam-ldapd-0.7/   (props changed)
   nss-pam-ldapd-0.7/nslcd/netgroup.c

Modified: nss-pam-ldapd-0.7/nslcd/netgroup.c
==============================================================================
--- nss-pam-ldapd-0.7/nslcd/netgroup.c  Mon Jul 23 23:13:27 2012        (r1729)
+++ nss-pam-ldapd-0.7/nslcd/netgroup.c  Mon Jul 23 23:16:54 2012        (r1730)
@@ -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/