PHP 4.0 Bug #7350: crypt causes floating point exception
| From: | ben at henshaw dot net | Date: | Thu, 19 Oct 2000 20:18:33 +0000 |
| Subject: | PHP 4.0 Bug #7350: crypt causes floating point exception | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-35563@lists.php.net to get a copy of this message | ||
From: ben@henshaw.net
Operating system: FreeBSD 3.3-RELEASE
PHP version: 4.0.3pl1
PHP Bug Type: Reproduceable crash
Bug description: crypt causes floating point exception
The crypt function is causing a floting point exception when used without a salt. I have been able
to reproduce this crash using this simple code:
<? echo crypt('blah'); ?>
My PHP is configuring is this:
'--disable-debug' \
'--enable-track-vars' \
'--with-apxs=/usr/local/apache/bin/apxs' \
'--with-mysql' \
'--with-gdbm=/usr/local' \
'--enable-versioning' \
'--with-pdflib' \
'--with-cybercash=/root/src/mck/mck-3.2.0.6-
i386-pc-freebsdelf3.2'
Here is the backtrace I pulled from gdb:
0x282b4905 in php_if_crypt (ht=1, return_value=0x8294c0c, this_ptr=0x0,
return_value_used=1) at crypt.c:153
153 srand48((unsigned int) time(0) * getpid() * (php_combined_lcg() * 10000.0));
As far as I can tell, the exception doesn't happen when I enter a salt. I'm using the MD5
password scheme on my FreeBSD box, instead of DES.
--
Edit Bug report at: http://bugs.php.net/?id=7350&edit=1