Bug#382081: mutt: date handling bug (integer overflow)
  Home FAQ Contact Sign in
Your Ad Here
linux.debian.bugs.dist only
 
Advanced search
POPULAR GROUPS

more...

linux.debian.bugs.dist Profile…

 Up
Bug#382081: mutt: date handling bug (integer overflow)         


Author: Daniele Sempione
Date: Aug 8, 2006 12:00

Package: mutt
Version: 1.5.12-1
Severity: normal

there is an integer overflow handling received emails' date, i.e. when
the date is later than Tue Jan 19 04:14:07 2038. this is shown in emails'
list:
52 N Dec 14 sender ( 124) subject

this one's date is `Tue, 19 Jan 2038 11:14:07 +0800', which overflows to
14 Dec 1901. the displayed `Date' field of the email header doesn't change.
i guess the behaviour is:
date_to_int();
sort_mails();
int_to_date(); /* integer overflow */

Cheers,
Daniele
Show full article (1.76Kb)
1 Comment
Bug#382081: mutt: date handling bug (integer overflow)         


Author: Rocco Rutte
Date: Jan 15, 2008 04:10

Hi,

* Daniele Sempione wrote:
>there is an integer overflow handling received emails' date, i.e. when
>the date is later than Tue Jan 19 04:14:07 2038. this is shown in emails'
>list:
> 52 N Dec 14 sender ( 124) subject
>this one's date is `Tue, 19 Jan 2038 11:14:07 +0800', which overflows to
>14 Dec 1901. the displayed `Date' field of the email header doesn't change.
>i guess the behaviour is:
>date_to_int();
>sort_mails();
>int_to_date(); /* integer overflow */

No, it's (roughly) string -> struct tm -> time_t (mutt_parse_date() ->
mutt_mktime()). It depends on how large time_t is (32/64 bit) whether
there's an overflow or not. For 32 bit values, the problem is known and
should be fixed in C library rather using workarounds in mutt by turning
time_t into 64 bit int.

Rocco
Show full article (0.96Kb)
no comments