patchMHonArc - Patches: patch #7682, Fix for a crash when minute or...


You are not allowed to post comments on this tracker with your current authentication level.

patch #7682: Fix for a crash when minute or second is invalid

Submitted by:  Robert Sheehy <rjsheehy>
Submitted on:  Thu 01 Dec 2011 12:02:08 PM UTC  
Category:  None Priority:  7 - High
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Thu 01 Dec 2011 12:02:08 PM UTC, original submission:

Added the two lines below:

while ($min > 59 ) { $min-- } ;
while ($sec > 59 ) { $sec-- } ;

This check was required because I would sometimes receive mail that had either the second and/or the minute set to the value "60", which was rejected as invalid by the timegm() function.

Prior to passing $min or $sec to the timegm() function, this code now ensures that any value greater than 59 is decrimented to a legal value.

This has fixed the crashes that were occuring on our production systems.

Potentially $hr could also be checked for values greater than 23, but I did not impliment or test this additional change.

Robert Sheehy <rjsheehy>


Attached Files
file #24513: added by rjsheehy (20KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by rjsheehy (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-12-01 rjsheehy Attached File- => Added, #24513

    Back to the top

    Powered by Savane 3.4