php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7350 crypt causes floating point exception
Submitted: 2000-10-19 16:18 UTC Modified: 2000-11-28 18:06 UTC
From: ben at henshaw dot net Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0.3pl1 OS: FreeBSD 3.3-RELEASE
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ben at henshaw dot net
New email:
PHP Version: OS:

 

 [2000-10-19 16:18 UTC] ben at henshaw dot net
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-21 04:33 UTC] sniper@php.net
Could you try latest snapshot from http://snaps.php.net/
to verify if this is still happening ?

--Jani
 [2000-11-28 18:06 UTC] sniper@php.net
User feedback:
-----------
 I just tested crypt with the snap "php4-200011281345" and it 
appears that the bug has been fixed.  No more floating point exceptions.
-----------

Closed.

--Jani

 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Sat Oct 10 12:00:01 2026 UTC