diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-13 06:12:30 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-13 06:12:30 +0000 |
commit | 80072d1ee0161c430f44b40ad52d3038a039d364 (patch) | |
tree | f8b36d025ec73b317be44d778c2706b7be876642 | |
parent | c505586c9e396225a26f2325fdde54162ecf54bb (diff) |
fixed 32-bit integer overflow where the total size of POP3 messages is greater than 2GB.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@895 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.ja | 6 | ||||
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | libsylph/pop.c | 2 | ||||
-rw-r--r-- | libsylph/pop.h | 6 | ||||
-rw-r--r-- | src/inc.c | 6 | ||||
-rw-r--r-- | src/inc.h | 2 |
7 files changed, 28 insertions, 8 deletions
@@ -1,3 +1,9 @@ +2006-01-13 + + * libsylph/pop.[ch] + src/inc.[ch]: fixed 32-bit integer overflow where the total size of + messages is greater than 2GB. + 2006-01-12 * src/summaryview.c: summary_set_tree_model_from_list(): fixed a diff --git a/ChangeLog.ja b/ChangeLog.ja index ba16074d..f7d41059 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,9 @@ +2006-01-13 + + * libsylph/pop.[ch] + src/inc.[ch]: メッセージの合計サイズが 2GB を超える場合に 32bit + 整数オーバーフローを起こすのを修正。 + 2006-01-12 * src/summaryview.c: summary_set_tree_model_from_list(): スレッド表示 @@ -1,5 +1,13 @@ Changes of Sylpheed +* 2.2.0beta4 (development) + + * The context menu of the folder view on search folders was modified. + * The bug that stopped checking of new messages if search folders exist + in IMAP4 or News mailboxes was fixed. + * The renaming of search folders under IMAP4 or News folders was fixed. + * A memory leak that occurs when thread display was off was fixed. + * 2.2.0beta3 (development) * The results of search folders are cached to speed up the next search. diff --git a/libsylph/pop.c b/libsylph/pop.c index f0344957..7988ef48 100644 --- a/libsylph/pop.c +++ b/libsylph/pop.c @@ -187,7 +187,7 @@ static gint pop3_getrange_stat_send(Pop3Session *session) static gint pop3_getrange_stat_recv(Pop3Session *session, const gchar *msg) { - if (sscanf(msg, "%d %d", &session->count, &session->total_bytes) != 2) { + if (sscanf(msg, "%d %Ld", &session->count, &session->total_bytes) != 2) { log_warning(_("POP3 protocol error\n")); session->error_val = PS_PROTOCOL; return -1; diff --git a/libsylph/pop.h b/libsylph/pop.h index 0ca59e66..b15f8ead 100644 --- a/libsylph/pop.h +++ b/libsylph/pop.h @@ -116,11 +116,11 @@ struct _Pop3Session gchar *user; gchar *pass; gint count; - gint total_bytes; + gint64 total_bytes; gint cur_msg; gint cur_total_num; - gint cur_total_bytes; - gint cur_total_recv_bytes; + gint64 cur_total_bytes; + gint64 cur_total_recv_bytes; Pop3MsgInfo *msg; @@ -842,8 +842,8 @@ static void inc_progress_dialog_set_progress(IncProgressDialog *inc_dialog, gchar buf[MSGBUFSIZE]; Pop3Session *pop3_session = POP3_SESSION(inc_session->session); gchar *total_size_str; - gint cur_total; - gint total; + gint64 cur_total; + gint64 total; if (!pop3_session->new_msg_exist) return; @@ -954,7 +954,7 @@ static gint inc_recv_data_progressive(Session *session, guint cur_len, IncSession *inc_session = (IncSession *)data; Pop3Session *pop3_session = POP3_SESSION(session); IncProgressDialog *inc_dialog; - gint cur_total; + gint64 cur_total; g_return_val_if_fail(inc_session != NULL, -1); @@ -73,7 +73,7 @@ struct _IncSession GHashTable *folder_table; /* table of destination folders */ GHashTable *tmp_folder_table; /* for progressive update */ - gint cur_total_bytes; + gint64 cur_total_bytes; gpointer data; }; |