derick Fri Feb 22 17:48:46 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/date/lib dow.c
Log:
- MFH: Fixed bug #44216 (strftime segfaults on large negative value).
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/dow.c?r1=1.8.2.3.2.3.2.1&r2=1.8.2.3.2.3.2.2&diff_format=u
Index: php-src/ext/date/lib/dow.c
diff -u php-src/ext/date/lib/dow.c:1.8.2.3.2.3.2.1
php-src/ext/date/lib/dow.c:1.8.2.3.2.3.2.2
--- php-src/ext/date/lib/dow.c:1.8.2.3.2.3.2.1 Mon Dec 31 07:17:07 2007
+++ php-src/ext/date/lib/dow.c Fri Feb 22 17:48:46 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dow.c,v 1.8.2.3.2.3.2.1 2007/12/31 07:17:07 sebastian Exp $ */
+/* $Id: dow.c,v 1.8.2.3.2.3.2.2 2008/02/22 17:48:46 derick Exp $ */
#include "timelib.h"
@@ -35,10 +35,12 @@
{
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];
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php