[asterisk-commits] [svn-commits] tilghman: branch 1.6.0 r106359 - in /branches/1.6.0: ./ res/res_config_ldap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 5 23:25:06 CST 2008


Author: tilghman
Date: Wed Mar  5 23:25:05 2008
New Revision: 106359

URL: http://svn.digium.com/view/asterisk?view=rev&rev=106359
Log:
Merged revisions 106346 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

.......
r106346 | tilghman | 2008-03-05 23:21:39 -0600 (Wed, 05 Mar 2008) | 7 lines

Missing braces, fix parsing
(closes issue #12112)
 Reported by: cyrenity
 Patches: 
       res_config_ldap.patch-03-03-2008 uploaded by cyrenity (license 416)
 Tested by: cyrenity, Corydon76

.......

Modified:
    branches/1.6.0/   (props changed)
    branches/1.6.0/res/res_config_ldap.c

Propchange: branches/1.6.0/
------------------------------------------------------------------------------
--- trunk-merged (original)
+++ trunk-merged Wed Mar  5 23:25:05 2008
@@ -1,1 +1,1 @@
-/trunk:1-105595,105675,105677,105733-105734,105773,105785,105804,105840-105841,105864,105899,105933,106036,106040,106139,106186,106238-106239,106329
+/trunk:1-105595,105675,105677,105733-105734,105773,105785,105804,105840-105841,105864,105899,105933,106036,106040,106139,106186,106238-106239,106329,106346

Modified: branches/1.6.0/res/res_config_ldap.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/res/res_config_ldap.c?view=diff&rev=106359&r1=106358&r2=106359
==============================================================================
--- branches/1.6.0/res/res_config_ldap.c (original)
+++ branches/1.6.0/res/res_config_ldap.c Wed Mar  5 23:25:05 2008
@@ -687,7 +687,9 @@
 	ast_debug(2, "name='%s' value='%s'\n", name, value);
 
 	if (like_pos) {
-		name = new_name = ast_strdupa(like_pos + strlen(" LIKE"));
+		int len = like_pos - name;
+		name = new_name = ast_strdupa(name);
+		new_name[len] = '\0';
 		value = new_value = ast_strdupa(value);
 		replace_string_in_string(new_value, "\\_", "_");
 		replace_string_in_string(new_value, "%", "*");
@@ -725,9 +727,10 @@
 		return NULL;
 	} 
 
-	if (!(filter = ast_str_create(80)))
+	if (!(filter = ast_str_create(80))) {
 		ast_free(clean_basedn);
 		return NULL;
+	}
 
 	/* Get the first parameter and first value in our list of passed paramater/value pairs  */
 	newparam = va_arg(ap, const char *);


_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits





More information about the asterisk-commits mailing list