Bug #2673: calendar functions cause php crash when passed a number that is too big

From: Date: Sat, 06 Nov 1999 00:19:35 +0000
Subject: Bug #2673: calendar functions cause php crash when passed a number that is too big
Groups: php.dev 
Request: Send a blank email to php-dev+get-12153@lists.php.net to get a copy of this message
From: agent86@earthling.net Operating system: NT4 sp5 PHP version: 3.0.11 PHP Bug Type: Misbehaving function Bug description: calendar functions cause php crash when passed a number that is too big The following script will crash php every time. It is actually any of the calendar functions that cause the crash. I tried most of the jd to something functions. $jdate=filectime("d:/somedir/somefile"); $filedate=jdtogregorian($jdate); This causes a crash. The dialog box title is: OleMainThreadWndName:php.exe - Application Error The dialog box contents: The instruction at "0x0042447d" referenced memory at "0x00000000". The memory could not be "read". Click OK to terminate the application I realize I am passing a timestamp instead of julian count. Originally I did this unintentionally. What my error exposed is that passing a julian day count that is very large to the jdtosomething functions will cause them to crash php instead of merely generating an error message. This occurs whether the module is loaded in php.ini or dynamically with dl(). I also get the same crash when I run the script in a dos box (no web server). Not a serious bug, but it does cause a crash (at least for the NT version) if you pass a large number (like a timestamp) to the calendar functions. Thanks!

« previous php.dev (#12153) next »