pajoye                                   Thu, 11 Feb 2010 11:02:53 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=294878

Log:
- Fixed bug #49585 (date_format buffer not long enough for >4 digit years).

Bug: http://bugs.php.net/49585 (Closed) date_format buffer not long enough for 
>4 digit years
      
Changed paths:
    _U  php/php-src/branches/PHP_5_3_2/
    U   php/php-src/branches/PHP_5_3_2/NEWS
    U   php/php-src/branches/PHP_5_3_2/ext/date/php_date.c
    A + php/php-src/branches/PHP_5_3_2/ext/date/tests/bug49585.phpt
        (from php/php-src/branches/PHP_5_3/ext/date/tests/bug49585.phpt:r294855)
    _U  php/php-src/branches/PHP_5_3_2/ext/tidy/tests/
    _U  
php/php-src/branches/PHP_5_3_2/tests/security/open_basedir_parse_ini_file.phpt

Property changes on: php/php-src/branches/PHP_5_3_2
___________________________________________________________________
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292677,292682-292683,292693,292716,292719,292762,292765,292771,292777,292823,293051,293075,293114,293126,293131,293144,293146,293152,293175-293176,293180,293216,293235,293253,293268,293341,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293735,293762,293768,293804,293815-293816,293862,293894,293896-293897,293901-293906,293917-293918,293965-293966,293974,293976-293977,293985,293998,294040,294053,294075,294077-294078,294081,294089,294094,294100,294102,294104,294126-294127,294129,294164,294251-294253,294255,294259-294261,294265,294267,294269,294272,294278,294285,294302-294304,294307-294308,294310,294312-294313,294315,294317,294320-294323,294333-294336,294353,294418,294421,294487,294498,294532,294571,294695,294697,294724,294814,294816,294825,294849
/php/php-src/trunk:284726
   + /php/php-src/branches/PHP_5_3:292504,292574,292594-292595,292611,292624,292630,292632-292635,292654,292677,292682-292683,292693,292716,292719,292762,292765,292771,292777,292823,293051,293075,293114,293126,293131,293144,293146,293152,293175-293176,293180,293216,293235,293253,293268,293341,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293735,293762,293768,293804,293815-293816,293862,293894,293896-293897,293901-293906,293917-293918,293965-293966,293974,293976-293977,293985,293998,294040,294053,294075,294077-294078,294081,294089,294094,294100,294102,294104,294126-294127,294129,294164,294251-294253,294255,294259-294261,294265,294267,294269,294272,294278,294285,294302-294304,294307-294308,294310,294312-294313,294315,294317,294320-294323,294333-294336,294353,294418,294421,294487,294498,294532,294571,294695,294697,294724,294814,294816,294825,294849,294855
/php/php-src/trunk:284726

Modified: php/php-src/branches/PHP_5_3_2/NEWS
===================================================================
--- php/php-src/branches/PHP_5_3_2/NEWS	2010-02-11 10:22:04 UTC (rev 294877)
+++ php/php-src/branches/PHP_5_3_2/NEWS	2010-02-11 11:02:53 UTC (rev 294878)
@@ -19,6 +19,8 @@

 - Fixed bug #50940 Custom content-length set incorrectly in Apache sapis.
   (Brian France, Rasmus)
+- Fixed bug #50930 (Wrong date by php_date.c patch with ancient gcc/glibc
+  versions). (Derick)
 - Fixed bug #50907 (X-PHP-Originating-Script adding two new lines in *NIX).
   (Ilia)
 - Fixed bug #50859 (build fails with openssl 1.0 due to md2 deprecation).
@@ -49,6 +51,8 @@
 - Fixed bug #50632 (filter_input() does not return default value if the
   variable does not exist). (Ilia)
 - Fixed bug #50576 (XML_OPTION_SKIP_TAGSTART option has no effect). (Pierrick)
+- Fixed bug #49585 (date_format buffer not long enough for >4 digit years).
+  (Derick, Adam)
 - Fixed bug #49560 (oci8: using LOBs causes slow PHP shutdown). (Oracle Corp.)
 - Fixed bug #48590 (SoapClient does not honor max_redirects). (Sriram)
 - Fixed bug #48190 (Content-type parameter "boundary" is not case-insensitive

Modified: php/php-src/branches/PHP_5_3_2/ext/date/php_date.c
===================================================================
--- php/php-src/branches/PHP_5_3_2/ext/date/php_date.c	2010-02-11 10:22:04 UTC (rev 294877)
+++ php/php-src/branches/PHP_5_3_2/ext/date/php_date.c	2010-02-11 11:02:53 UTC (rev 294878)
@@ -1126,7 +1126,7 @@
 			case 'Z': length = slprintf(buffer, 32, "%d", localtime ? offset->offset : 0); break;

 			/* full date/time */
-			case 'c': length = slprintf(buffer, 32, "%04d-%02d-%02dT%02d:%02d:%02d%c%02d:%02d",
+			case 'c': length = slprintf(buffer, 96, "%04d-%02d-%02dT%02d:%02d:%02d%c%02d:%02d",
 							                (int) t->y, (int) t->m, (int) t->d,
 											(int) t->h, (int) t->i, (int) t->s,
 											localtime ? ((offset->offset < 0) ? '-' : '+') : '+',

Copied: php/php-src/branches/PHP_5_3_2/ext/date/tests/bug49585.phpt (from rev 294855, php/php-src/branches/PHP_5_3/ext/date/tests/bug49585.phpt)
===================================================================
--- php/php-src/branches/PHP_5_3_2/ext/date/tests/bug49585.phpt	                        (rev 0)
+++ php/php-src/branches/PHP_5_3_2/ext/date/tests/bug49585.phpt	2010-02-11 11:02:53 UTC (rev 294878)
@@ -0,0 +1,16 @@
+--TEST--
+Bug #49585 (date_format buffer not long enough for >4 digit years)
+--FILE--
+<?php
+date_default_timezone_set('UTC');
+
+$date = new DateTime('-1500-01-01');
+var_dump($date->format('r'));
+
+$date->setDate(-2147483648, 1, 1);
+var_dump($date->format('r'));
+var_dump($date->format('c'));
+--EXPECT--
+string(32) "Sat, 01 Jan -1500 00:00:00 +0000"
+string(42) "Unknown, 01 Jan -2147483648 00:00:00 +0000"
+string(32) "-2147483648-01-01T00:00:00+00:00"


Property changes on: php/php-src/branches/PHP_5_3_2/ext/tidy/tests
___________________________________________________________________
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3/ext/tidy/tests:292562,292566,292571,292574,292635,292716,292719,292765,293146,293152,293175-293176,293180,293216,293235,293253,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293735,293762,293768,293804,293815-293816,293862,293894,293896-293897,293901-293906,293917-293918,293965-293966,293976-293977,293985,293998,294040,294053,294075,294077-294078,294081,294089,294094,294100,294102,294104,294126-294127,294129,294164,294251-294253,294255,294259-294261,294265,294267,294269,294272,294278,294285,294302-294304,294307-294308,294310,294312-294313,294315,294317,294320-294323,294333-294336,294353,294418,294421,294487,294498,294532,294571,294695,294697,294724,294814,294816,294825,294849
/php/php-src/trunk/ext/tidy/tests:29815-29816,284726,287798-287941
   + /php/php-src/branches/PHP_5_3/ext/tidy/tests:292562,292566,292571,292574,292635,292716,292719,292765,293146,293152,293175-293176,293180,293216,293235,293253,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293735,293762,293768,293804,293815-293816,293862,293894,293896-293897,293901-293906,293917-293918,293965-293966,293976-293977,293985,293998,294040,294053,294075,294077-294078,294081,294089,294094,294100,294102,294104,294126-294127,294129,294164,294251-294253,294255,294259-294261,294265,294267,294269,294272,294278,294285,294302-294304,294307-294308,294310,294312-294313,294315,294317,294320-294323,294333-294336,294353,294418,294421,294487,294498,294532,294571,294695,294697,294724,294814,294816,294825,294849,294855
/php/php-src/trunk/ext/tidy/tests:29815-29816,284726,287798-287941


Property changes on: php/php-src/branches/PHP_5_3_2/tests/security/open_basedir_parse_ini_file.phpt
___________________________________________________________________
Modified: svn:mergeinfo
   - /php/php-src/branches/PHP_5_3/tests/security/open_basedir_parse_ini_file.phpt:292562,292566,292571,292574,292716,293146,293152,293175-293176,293180,293216,293235,293253,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293735,293762,293768,293804,293815-293816,293862,293894,293896-293897,293901-293906,293917-293918,293965-293966,293976-293977,293985,293998,294040,294053,294075,294077-294078,294081,294089,294094,294100,294102,294104,294126-294127,294129,294164,294251-294253,294255,294259-294261,294265,294267,294269,294272,294278,294285,294302-294304,294307-294308,294310,294312-294313,294315,294317,294320-294323,294333-294336,294353,294418,294421,294487,294498,294532,294571,294695,294697,294724,294814,294816,294825,294849
/php/php-src/trunk/tests/security/open_basedir_parse_ini_file.phpt:29815-29816,265951
   + /php/php-src/branches/PHP_5_3/tests/security/open_basedir_parse_ini_file.phpt:292562,292566,292571,292574,292716,293146,293152,293175-293176,293180,293216,293235,293253,293380,293400,293442,293447,293466,293487,293502,293538,293548,293558,293588,293590,293597,293627,293644,293653,293655,293699,293726-293728,293732,293735,293762,293768,293804,293815-293816,293862,293894,293896-293897,293901-293906,293917-293918,293965-293966,293976-293977,293985,293998,294040,294053,294075,294077-294078,294081,294089,294094,294100,294102,294104,294126-294127,294129,294164,294251-294253,294255,294259-294261,294265,294267,294269,294272,294278,294285,294302-294304,294307-294308,294310,294312-294313,294315,294317,294320-294323,294333-294336,294353,294418,294421,294487,294498,294532,294571,294695,294697,294724,294814,294816,294825,294849,294855
/php/php-src/trunk/tests/security/open_basedir_parse_ini_file.phpt:29815-29816,265951
-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to