#3880: integer overflow in date.c (mutt_mktime)
-----------------------+----------------------
  Reporter:  vinc17    |      Owner:  mutt-dev
      Type:  defect    |     Status:  closed
  Priority:  critical  |  Milestone:
 Component:  mutt      |    Version:  1.7.0
Resolution:  fixed     |   Keywords:
-----------------------+----------------------
Changes (by Kevin McCarthy <kevin@…>):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"a8203b4463c1637c99d2c08ba0760660f5d25330"
 6827:a8203b4463c1]:
 {{{
 #!CommitTicketReference repository=""
 revision="a8203b4463c1637c99d2c08ba0760660f5d25330"
 Prevent an integer overflow in mutt_mktime() (closes #3880)

 Check to make sure the year passed in isn't bigger than can be
 represented using time_t on the platform.

 Also add a (time_t) cast to an intermediate "years * 365" calculation
 to prevent an overflow there.

 Thanks to TAKAHASHI Tamotsu for his patch, and to Vincent Lefèvre for
 his improvement.  I merely took their code and commited it.
 }}}

--
Ticket URL: <https://dev.mutt.org/trac/ticket/3880#comment:23>
Mutt <http://www.mutt.org/>
The Mutt mail user agent

Reply via email to