PHP 4.0 Bug #9083 Updated: Buffer overflow in ext/standard/datetime.c

From: Date: Fri, 02 Feb 2001 22:22:45 +0000
Subject: PHP 4.0 Bug #9083 Updated: Buffer overflow in ext/standard/datetime.c
Groups: php.dev 
Request: Send a blank email to php-dev+get-45647@lists.php.net to get a copy of this message
ID: 9083 Updated by: elixer Reported By: jpdalbec@cc.ysu.edu Status: Open Bug Type: Reproduceable crash Assigned To: Comments: This is fixed in CVS, please try snaps.php.net. Sean Previous Comments: --------------------------------------------------------------------------- [2001-02-02 17:08:01] jpdalbec@cc.ysu.edu At least on my system, <? print(date('r')); ?> crashes the web server process. This is because it's trying to put a 32-byte string into a 16-byte buffer. static void php_date(INTERNAL_FUNCTION_PARAMETERS, int gm) { pval **format, **timestamp; time_t the_time; struct tm *ta, tmbuf; int i, size = 0, length, h, beat; - char tmp_buff[16]; + char tmp_buff[32]; switch(ZEND_NUM_ARGS()) { case 1: --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=9083&edit=2

« previous php.dev (#45647) next »