aboutsummaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-01-13 06:12:30 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-01-13 06:12:30 +0000
commit80072d1ee0161c430f44b40ad52d3038a039d364 (patch)
treef8b36d025ec73b317be44d778c2706b7be876642 /libsylph
parentc505586c9e396225a26f2325fdde54162ecf54bb (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
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/pop.c2
-rw-r--r--libsylph/pop.h6
2 files changed, 4 insertions, 4 deletions
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;