aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog13
-rw-r--r--addressbook/backend/pas/pas-backend-ldap.c18
2 files changed, 25 insertions, 6 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 480df273e7..81b7583ce4 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,16 @@
+2001-07-17 Chris Toshok <toshok@ximian.com>
+
+ [ Fixes bugs #4611 - crash searching in the name field at Bigfoot for "\"
+ and #4554 - general ldap search crash ]
+
+ * backend/pas/pas-backend-ldap.c (func_contains): the length of
+ the big query string needs to take into account the length of the
+ footer as well as the header - fix random memory corruption here.
+
+ * backend/pas/pas-backend-ldap.c (pas_backend_ldap_build_query):
+ list can be NULL, specifically if there's a parsing error in the
+ sexp, so deal with it.
+
2001-07-17 Jon Trowbridge <trow@ximian.com>
* backend/ebook/e-book-view-listener.c
diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c
index e1312ee5b9..056e56f28f 100644
--- a/addressbook/backend/pas/pas-backend-ldap.c
+++ b/addressbook/backend/pas/pas-backend-ldap.c
@@ -1552,7 +1552,7 @@ func_contains(struct _ESExp *f, int argc, struct _ESExpResult **argv, void *data
match_str = g_strdup_printf("=*%s%s)",
str, one_star ? "" : "*");
- query_length = strlen (header);
+ query_length = strlen (header) + strlen (footer);
for (i = 0; i < num_prop_infos; i ++) {
query_length += 1 + strlen(prop_info[i].ldap_attr) + strlen (match_str);
@@ -1727,13 +1727,19 @@ pas_backend_ldap_build_query (gchar *query)
e_sexp_result_free(sexp, r);
e_sexp_unref (sexp);
- if (list->next) {
- g_warning ("conversion to ldap query string failed");
- retval = NULL;
- g_list_foreach (list, (GFunc)g_free, NULL);
+ if (list) {
+ if (list->next) {
+ g_warning ("conversion to ldap query string failed");
+ retval = NULL;
+ g_list_foreach (list, (GFunc)g_free, NULL);
+ }
+ else {
+ retval = list->data;
+ }
}
else {
- retval = list->data;
+ g_warning ("conversion to ldap query string failed");
+ retval = NULL;
}
g_list_free (list);
12-181-0/+30 * - USE_RC_SUBR != yespgollucci2009-12-183-44/+2 * Remove USE_REINPLACE from categories starting with a Jedwin2006-05-091-1/+0 * Remove the FreeBSD KEYWORD from all rc.d scripts where it appears.dougb2006-02-211-1/+0 * SHA256ifyedwin2006-01-221-0/+1 * Run in background mode.arved2004-08-132-1/+12 * - Update maintainer's addresspav2004-04-181-1/+1 * Remove unused entry for cdb-0.75.tar.gz. List size.trevor2004-03-111-1/+1