[Commits] [SCM] claws branch, master, updated. 3.11.1-145-g72a9c0b

ticho at claws-mail.org ticho at claws-mail.org
Sat Jun 20 22:42:28 CEST 2015


The branch, master has been updated
       via  72a9c0b46adc467c6ceacc608bceff52c19950dd (commit)
      from  6044d9dcb1b996b1ba269174441eebf51a96439b (commit)

Summary of changes:
 src/ldaputil.c |    7 +++++++
 1 file changed, 7 insertions(+)


- Log -----------------------------------------------------------------
commit 72a9c0b46adc467c6ceacc608bceff52c19950dd
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sat Jun 20 22:38:53 2015 +0200

    Do not free LDAP error string on Windows.
    
    Fixes bug #2816 - LDAP addressbook search crashes Claws Mail.

diff --git a/src/ldaputil.c b/src/ldaputil.c
index 0000a1e..6c2952b 100644
--- a/src/ldaputil.c
+++ b/src/ldaputil.c
@@ -324,7 +324,14 @@ const gchar *ldaputil_get_error(LDAP *ld)
 		strncpy2(error, ld_error, sizeof(error));
 	else
 		strncpy2(error, _("Unknown error"), sizeof(error));
+#ifndef G_OS_WIN32
+	/* From https://msdn.microsoft.com/en-us/library/aa366594%28v=vs.85%29.aspx
+	 * "LDAP_OPT_ERROR_STRING returns a pointer to an internal static
+	 * string table, and ldap_memfree should not be called when using
+	 * this session option."
+	 */
 	ldap_memfree(ld_error);
+#endif
 
 	return error;
 }

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list