#49585 [Asn->Csd]: date_format buffer not long enough for >4 digit years

From: Date: Wed, 10 Feb 2010 16:56:07 +0000
Subject: #49585 [Asn->Csd]: date_format buffer not long enough for >4 digit years
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-147401@lists.php.net to get a copy of this message
ID: 49585 Updated by: derick@php.net Reported By: aharvey@php.net -Status: Assigned +Status: Closed Bug Type: Date/time related Operating System: Linux (Ubuntu 9.04) PHP Version: 5.3SVN-2009-09-18 (SVN) Assigned To: derick New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2010-02-10 16:55:41] svn@php.net Automatic comment from SVN on behalf of derick Revision: http://svn.php.net/viewvc/?view=revision&revision=294855 Log: - Fixed bug #49585 (date_format buffer not long enough for >4 digit years). #- Was already partly fixed with my previous commit. ------------------------------------------------------------------------ [2009-09-18 09:28:23] aharvey@php.net Gah, just found another corner case while writing the PHPT case. The "short" day name used by 'r' may not actually be three characters in all cases -- 'Unknown' can be returned. Ergo, we need another four characters. Revised patch: http://www.adamharvey.name/stuff/date-format-buffer-64-revised.patch PHPT test case: http://www.adamharvey.name/stuff/bug49585.phpt ------------------------------------------------------------------------ [2009-09-18 09:10:18] aharvey@php.net By which I mean http://www.adamharvey.name/stuff/date-format-buffer-64.patch -- the PHP bug tracker's autolinking picked up the full stop. :) ------------------------------------------------------------------------ [2009-09-18 09:09:32] aharvey@php.net Actually, I'm running a 64 bit machine anyway; the point is that the explicit (int) cast will be 32 bit regardless on an LP64 or LLP64 architecture. Nevertheless, a patch that can definitely handle 64 bit ints is at http://www.adamharvey.name/stuff/date-format-buffer-64.patch. ------------------------------------------------------------------------ [2009-09-18 09:01:48] derick@php.net Oh, and a few phpt test cases would be awesome too :-) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/49585 -- Edit this bug report at http://bugs.php.net/?id=49585&edit=1

« previous php.bugs (#147401) next »