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

 
 

You are not allowed to post comments on this tracker with your current authentification 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: NonePriority: 7 - High
Status: NonePrivacy: Public
Assigned to: NoneOpen/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:  mhutil.pl added by rjsheehy (20kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 01 Dec 2011 12:02:08 PM UTCrjsheehyAttached File-=>Added mhutil.pl, #24513

    Back to the top


    Powered by Savane 3.1-cleanup