aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-31 04:47:45 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-03-31 04:47:45 +0000
commit16bf2f2bd6dce510de8b3d6472ef9f4e0d30c255 (patch)
tree6538f198ece73e20505ee2b973fdf6372f85dc21
parenta778f4039a582a81a0a88c8401bdc1dfc2d9b7e5 (diff)
fixed broken PLAIN authentication.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@196 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.ja5
-rw-r--r--src/smtp.c6
3 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bffd9302..41c34dec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2005-03-31
+ * src/smtp.c: smtp_auth_plain(): fixed a bug that extra '\0' was
+ included in the auth string and PLAIN authentication failed
+ (thanks to IWAMOTO Kouichi).
+
+2005-03-31
+
* src/prefs_filter.c: reimplemented filter prefs dialog using
GtkTreeView.
diff --git a/ChangeLog.ja b/ChangeLog.ja
index f7adf65e..2e925ec9 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,10 @@
2005-03-31
+ * src/smtp.c: smtp_auth_plain(): 余分な '\0' が認証文字列に含まれて
+ おり、 PLAIN 認証に失敗するバグを修正(岩本さん thanks)。
+
+2005-03-31
+
* src/prefs_filter.c: フィルタ設定ダイアログを GtkTreeView を使用して
再実装。
diff --git a/src/smtp.c b/src/smtp.c
index 1c872b8c..57a3abbf 100644
--- a/src/smtp.c
+++ b/src/smtp.c
@@ -325,11 +325,11 @@ static gint smtp_auth_plain(SMTPSession *session)
session->auth_type = SMTPAUTH_PLAIN;
/*
- * construct the string: \0<user>\0<pass>\0
+ * construct the string: \0<user>\0<pass>
*/
- authlen = 1 + strlen(session->user) + 1 + strlen(session->pass) + 1;
- authstr = g_malloc(authlen);
+ authlen = 1 + strlen(session->user) + 1 + strlen(session->pass);
+ authstr = g_malloc(authlen + 1);
p = authstr;