Commit 94e6d75e authored by darin's avatar darin

Reviewed by Maciej.

	- fixed 3138213 -- browser hangs trying to open Apple travel site

        * kjs/date_object.cpp: (timetUsingCF): Check for very-negative year numbers too.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d1d93ce6
2003-01-02 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3138213 -- browser hangs trying to open Apple travel site
* kjs/date_object.cpp: (timetUsingCF): Check for very-negative year numbers too.
=== Alexander-48 ===
=== Alexander-47 ===
......
2003-01-02 Darin Adler <darin@apple.com>
Reviewed by Maciej.
- fixed 3138213 -- browser hangs trying to open Apple travel site
* kjs/date_object.cpp: (timetUsingCF): Check for very-negative year numbers too.
=== Alexander-48 ===
=== Alexander-47 ===
......
......@@ -133,9 +133,9 @@ static time_t timetUsingCF(struct tm *tm, CFTimeZoneRef timeZone)
date.month = tm->tm_mon + 1;
date.year = tm->tm_year + 1900;
// CFGregorianDateGetAbsoluteTime will go nuts if the year is too large,
// CFGregorianDateGetAbsoluteTime will go nuts if the year is too large or small,
// so we pick an arbitrary cutoff.
if (date.year > 2500) {
if (date.year < -2500 || date.year > 2500) {
return invalidDate;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment