diff options
| author | Derick Rethans <derick@php.net> | 2008-02-22 17:48:46 +0000 |
|---|---|---|
| committer | Derick Rethans <derick@php.net> | 2008-02-22 17:48:46 +0000 |
| commit | 6c5041979c9b0f9f05ac92427da53b60f6f6e7c3 (patch) | |
| tree | 86cecd73818aaa9fe303d4f85980d5b14462baee | |
| parent | f7078d469c1a9efd398525825dbb373227e7983e (diff) | |
| download | php-git-6c5041979c9b0f9f05ac92427da53b60f6f6e7c3.tar.gz | |
- MFH: Fixed bug #44216 (strftime segfaults on large negative value).
| -rw-r--r-- | ext/date/lib/dow.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/date/lib/dow.c b/ext/date/lib/dow.c index 876c7dfcb2..def1b3e59e 100644 --- a/ext/date/lib/dow.c +++ b/ext/date/lib/dow.c @@ -35,10 +35,12 @@ static timelib_sll timelib_day_of_week_ex(timelib_sll y, timelib_sll m, timelib_ { timelib_sll c1, y1, m1, dow; - /* Only valid for Gregorian calendar */ + /* Only valid for Gregorian calendar, commented out as we don't handle + * julian calendar. We just return the 'wrong' day of week to be + * consistent. if (y < 1753) { return -1; - } + } */ c1 = century_value(y / 100); y1 = (y % 100); m1 = timelib_is_leap(y) ? m_table_leap[m] : m_table_common[m]; |
