[evolution-data-server] Bug #679488 - Unable to send mail using SMTP



commit ecf2596f05c34027b7003b36ea6e7bb928dc23fb
Author: Milan Crha <mcrha redhat com>
Date:   Thu Aug 9 13:25:11 2012 +0200

    Bug #679488 - Unable to send mail using SMTP

 camel/providers/smtp/camel-smtp-transport.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c
index 8de7831..8903681 100644
--- a/camel/providers/smtp/camel-smtp-transport.c
+++ b/camel/providers/smtp/camel-smtp-transport.c
@@ -855,8 +855,14 @@ esmtp_get_authtypes (const guchar *buffer)
 	const guchar *start, *end;
 	GHashTable *table = NULL;
 
-	/* advance to the first token */
 	start = buffer;
+
+	/* make sure there is at least one delimiter
+	   character in the AUTH response */
+	if (!isspace ((gint) *start) && *start != '=')
+		return NULL;
+
+	/* advance to the first token */
 	while (isspace ((gint) *start) || *start == '=')
 		start++;
 
@@ -1180,7 +1186,7 @@ smtp_helo (CamelSmtpTransport *transport,
 						transport->flags &= ~CAMEL_SMTP_TRANSPORT_AUTH_EQUAL;
 
 					/* parse for supported AUTH types */
-					token += 5;
+					token += 4;
 
 					if (transport->authtypes) {
 						g_hash_table_foreach (transport->authtypes, authtypes_free, NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]