#41252 [Opn->Asn]: calling mcrypt_generic without first calling mcrypt_generic_init crashes
| From: | derick@php.net | Date: | Tue, 01 May 2007 15:39:02 +0000 |
| Subject: | #41252 [Opn->Asn]: calling mcrypt_generic without first calling mcrypt_generic_init crashes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-112143@lists.php.net to get a copy of this message | ||
ID: 41252
Updated by: derick@php.net
Reported By: terrafrost@php.net
-Status: Open
+Status: Assigned
Bug Type: Reproducible crash
Operating System: Windows XP
PHP Version: 4.4.6
-Assigned To:
+Assigned To: derick
New Comment:
I can reproduce this on Linux. Working on backporting the extra checks.
Previous Comments:
------------------------------------------------------------------------
[2007-05-01 15:19:28] terrafrost@php.net
Description:
------------
Calling mcrypt_generic() without first calling mcrypt_generic_init()
results in a crash on PHP 4.4.6 / Windows XP running the latest version
of mcrypt from http://ftp.emini.dk/pub/php/win32/mcrypt/. PHP
5 is
unaffected.
Reproduce code:
---------------
<?php
$td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_ECB, '');
echo mcrypt_generic($td,'aaaaaaaa');
?>
Expected result:
----------------
There should be some sort of error. Here's what PHP 5.2.1 says:
Warning: mcrypt_generic(): Operation disallowed prior to
mcrypt_generic_init() in {filename} on line 3
Actual result:
--------------
It crashes.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41252&edit=1