ID: 14456
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Duplicate
+Status: Closed
Bug Type: mcrypt related
Operating System: Linux 2.2.X
PHP Version: 4.1.0
Assigned To: derick
Previous Comments:
------------------------------------------------------------------------
[2001-12-12 15:48:48] [EMAIL PROTECTED]
dup of #14236
------------------------------------------------------------------------
[2001-12-12 09:15:33] [EMAIL PROTECTED]
Already known
------------------------------------------------------------------------
[2001-12-12 09:05:56] [EMAIL PROTECTED]
mcrypt_create_iv(mcrypt_get_iv_size (MCRYPT_DES , MCRYPT_MODE_ECB),
MCRYPT_RAND) produces following error and causes apache to segfault:
Warning - String is not zero-terminated
source: zend_execute_API.c:274
Workaround:
Replace the mcrypt_create_iv call with:
$fp = fopen("/dev/random", "r");
$iv = fread($fp, mcrypt_get_iv_size (MCRYPT_DES ,
MCRYPT_MODE_ECB));
fclose($fp);
Better: Should be fixed.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=14456&edit=1