]> granicus.if.org Git - php/commitdiff
- MFH: Fixed bug #44216 (strftime segfaults on large negative value).
authorDerick Rethans <derick@php.net>
Fri, 22 Feb 2008 17:49:30 +0000 (17:49 +0000)
committerDerick Rethans <derick@php.net>
Fri, 22 Feb 2008 17:49:30 +0000 (17:49 +0000)
NEWS
ext/date/lib/dow.c

diff --git a/NEWS b/NEWS
index 557776462d1e3cc8fcfa671ff58d64f622b9e475..20702f6671711dc5a943757c9c9787374dd5de65 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ PHP                                                                        NEWS
 - Upgraded PCRE to version 7.6 (Nuno)
 
 
+- Fixed bug #44216 (strftime segfaults on large negative value). (Derick)
 - Fixed bug #44209 (strtotime() doesn't support 64 bit timestamps on 64 bit
   platforms). (Derick)
 - Fixed bug #44197 (socket array keys lost on socket_select). (Felipe)
index 876c7dfcb206d062968beaafbed17ebd7c6995f7..def1b3e59e4ec88324a7ae45494f4a83cdd66240 100644 (file)
@@ -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];