Edit report at https://bugs.php.net/bug.php?id=55168&edit=1

 ID:                 55168
 Updated by:         il...@php.net
 Reported by:        ircmaxell at gmail dot com
 Summary:            mcrypt_create_iv uses E_ERROR on Win and E_WARNING
                     on *nix
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            mcrypt related
 Operating System:   Windows
 PHP Version:        5.4SVN-2011-07-09 (SVN)
-Assigned To:        
+Assigned To:        iliaa
 Block user comment: N
 Private report:     N

 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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------
[2011-07-09 15:33:00] ircmaxell at gmail dot com

Description:
------------
If you call mcrypt_create_iv with either the MCRYPT_DEV_RANDOM or 
MCRYPT_DEV_URANDOM constants, and it cannot generate enough data, it issues an 
E_ERROR fatal error.  However, on linux when the same situation it will just 
issue 
an E_WARNING.

I suggest that it should be changed from an E_ERROR to an E_WARNING on Windows 
(as 
it certainly is recoverable).

See:

http://svn.php.net/viewvc/php/php-src/branches/PHP_5_4/ext/mcrypt/mcrypt.c?
revision=311033&view=markup

Specifically lines 1397 and 1422



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=55168&edit=1

Reply via email to