php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55168 mcrypt_create_iv uses E_ERROR on Win and E_WARNING on *nix
Submitted: 2011-07-09 15:33 UTC Modified: 2011-07-11 12:53 UTC
From: ircmaxell at gmail dot com Assigned: iliaa (profile)
Status: Closed Package: mcrypt related
PHP Version: 5.4SVN-2011-07-09 (SVN) OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ircmaxell at gmail dot com
New email:
PHP Version: OS:

 

 [2011-07-09 15:33 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-11 12:53 UTC] iliaa@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: iliaa
 [2011-07-11 12:53 UTC] iliaa@php.net
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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 18:01:32 2024 UTC