ID: 13052
Updated by: derick
Old Status: Assigned
Status: Closed
Bug Type: mcrypt related
Operating System: GNU 1.0.3
PHP Version: 4.0.6
Assigned To: derick
New Comment:

Fixed in CVS (will be in 4.0.7)

Previous Comments:

[2001-08-30 04:08:38] [EMAIL PROTECTED]

Calling mcrypt_generic_init with an empty $key causes a segmentation fault in Apache. 
Obviously $key should not be empty, but errors will be made, so perhaps a parse error 
could be generated in this event rather than a crash.

Example Code
//Open encryption module
$td = mcrypt_module_open (MCRYPT_ARCFOUR, "", MCRYPT_MODE_STREAM, "");
srand ((double) microtime() * 1000000);
$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size ($td), MCRYPT_RAND);

//Encrypt data
$data = "message";
mcrypt_generic_init($td, $key, $iv);//HERE IS THE PROBLEM
$encrypted_data = mcrypt_generic ($td, $data);
mcrypt_generic_end ($td);


Edit this bug report at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to