Bug #55168 [Opn->Csd]: mcrypt_create_iv uses E_ERROR on Win and E_WARNING on *nix
| From: | iliaa@php.net | Date: | Mon, 11 Jul 2011 16:53:16 +0000 |
| Subject: | Bug #55168 [Opn->Csd]: mcrypt_create_iv uses E_ERROR on Win and E_WARNING on *nix | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-161801@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55168&edit=1
ID: 55168
Updated by: iliaa@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