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

Submitter:  Robert Sheehy <rjsheehy>
Submitted:  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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #24513:  mhutil.pl 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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

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

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code