#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:
-----------------------+----------------------

Comment (by derekmartin):

 It is correct for the time &now, because localtime() does take into
 account DST, now.  It could be incorrect when figuring the time of an
 arbitrary time which may or may not occur in the same DST context as now.

 Hopefully it's clear that the reason I've spent so much time on this bug
 is that I really don't like the code that Mutt has for this; I basically
 want to rewrite all the code that handles time and date. =8^)

 Whatever solution ultimately ends up in Mutt, I think it should rely on
 mktime() and eliminate Mutt's buggy local implementation of that function.
 Doing that correctly should also eliminate overflow issues without having
 to jump through hoops.  I think Vincent's comments in #3890 have the right
 idea...

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

Reply via email to