lists.arthurdejong.org
RSS feed

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

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

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



Author: arthur
Date: Wed Aug 24 22:22:20 2011
New Revision: 1515
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1515

Log:
fix a problem with uninitialised memory while parsing the tls_ciphers option 
(was broken in r853, similar problem was fixed in r910, reported by Isaac 
Freeman)

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

Modified: nss-pam-ldapd/nslcd/cfg.c
==============================================================================
--- nss-pam-ldapd/nslcd/cfg.c   Wed Aug 24 21:02:56 2011        (r1514)
+++ nss-pam-ldapd/nslcd/cfg.c   Wed Aug 24 22:22:20 2011        (r1515)
@@ -403,12 +403,10 @@
                         char **var)
 {
   check_argumentcount(filename,lnr,keyword,(*line!=NULL)&&(**line!='\0'));
-  if ((*var==NULL)||(strcmp(*var,*line)!=0))
-  {
-    /* Note: we have a memory leak here if a single mapping is changed
-             multiple times in one config (deemed not a problem) */
-    *var=xstrdup(*line);
-  }
+  /* Note: we have a memory leak here if a single mapping is changed
+           multiple times in one config (deemed not a problem) */
+  *var=xstrdup(*line);
+  /* mark that we are at the end of the line */
   *line=NULL;
 }
 
@@ -579,7 +577,7 @@
 static void parse_validnames_statement(const char *filename,int lnr,
                    const char *keyword,char *line,struct ldap_config *cfg)
 {
-  char *value=NULL;
+  char *value;
   int i,l;
   int flags=REG_EXTENDED|REG_NOSUB;
   /* the rest of the line should be a regular expression */
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits