From 4c8ad4770fac090b02d73f3b186077a77b57775a Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Wed, 22 May 2013 10:40:50 +0200 Subject: [PATCH] dovecot: add latest upstream fixes and improvements for dovecot 2.2.2 Note: The patch now includes all fixes and improvements for dovecot 2.2.2 from the dovecot 2.2 branch up to http://hg.dovecot.org/dovecot-2.2/rev/0e324209d885. --- .../dovecot-2.2.2-0000-upstream-fixes.patch | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/mail/dovecot/dovecot-2.2.2-0000-upstream-fixes.patch b/mail/dovecot/dovecot-2.2.2-0000-upstream-fixes.patch index 7a3490df7..10e481f65 100644 --- a/mail/dovecot/dovecot-2.2.2-0000-upstream-fixes.patch +++ b/mail/dovecot/dovecot-2.2.2-0000-upstream-fixes.patch @@ -337,3 +337,37 @@ index 462815a..3dab919 100644 -- 1.7.10.2 + +From b926a5783dc35da61af12d6a4de992ff2964b0e7 Mon Sep 17 00:00:00 2001 +From: Timo Sirainen +Date: Tue, 21 May 2013 17:09:37 +0300 +Subject: [PATCH] auth: Fixed crash if LDAP query returned multiple results. + + +diff --git a/src/auth/db-ldap.c b/src/auth/db-ldap.c +index 955e2e6..c61af85 100644 +--- a/src/auth/db-ldap.c ++++ b/src/auth/db-ldap.c +@@ -825,8 +825,10 @@ static void db_ldap_request_free(struct ldap_request *request, LDAPMessage *res) + + if (srequest->result == res) + res = NULL; +- if (srequest->result != NULL) ++ if (srequest->result != NULL) { + ldap_msgfree(srequest->result); ++ srequest->result = NULL; ++ } + + if (array_is_created(&srequest->named_results)) { + array_foreach(&srequest->named_results, named_res) { +@@ -835,6 +837,7 @@ static void db_ldap_request_free(struct ldap_request *request, LDAPMessage *res) + if (named_res->result != NULL) + ldap_msgfree(named_res->result); + } ++ array_clear(&srequest->named_results); + } + } + if (res != NULL) +-- +1.7.10.2 +