File murder-backend-empty-mechlist.patch of Package cyrus-imapd.import5240

From 1d90588637c8c287c041cca7a986464c45154cdf Mon Sep 17 00:00:00 2001
From: Ralf Haferkamp <rhafer@suse.de>
Date: Tue, 23 Feb 2010 14:04:42 +0100
Subject: [PATCH] only copy mechlist if it is not empty (bnc#551346)

see also: https://bugzilla.andrew.cmu.edu/show_bug.cgi?id=3166

 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/imap/backend.c b/imap/backend.c
index a0cb6c7..45c85ab 100644
--- a/imap/backend.c
+++ b/imap/backend.c
@@ -449,7 +449,12 @@ struct backend *backend_connect(struct backend *ret_backend, const char *server,
     if ((server[0] != '/') ||
 	(strcmp(prot->sasl_service, "lmtp") &&
 	 strcmp(prot->sasl_service, "csync"))) {
-	char *mlist = xstrdup(mechlist); /* backend_auth is destructive */
+	char *mlist;
+        if ( mechlist ){
+            mlist = xstrdup(mechlist); /* backend_auth is destructive */
+        } else {
+            mlist = xstrdup("");
+        }
 
 	if ((r = backend_authenticate(ret, prot, &mlist, userid,
 				      cb, auth_status))) {
-- 
1.6.4.2