From: Pierre Joye Date: Fri, 9 Oct 2009 17:28:52 +0000 (+0000) Subject: - Merge: Fixed bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes) X-Git-Tag: php-5.3.1RC2~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8263990a67fa143aa4c61ee992dfc77b586a4c8b;p=php - Merge: Fixed bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes) --- diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index 1a5646eac1..d14809a504 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -780,6 +780,7 @@ PHP_FUNCTION(mcrypt_generic_deinit) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not terminate encryption specifier"); RETURN_FALSE } + pm->init = 0; RETURN_TRUE } /* }}} */ diff --git a/ext/mcrypt/tests/bug49738.phpt b/ext/mcrypt/tests/bug49738.phpt new file mode 100644 index 0000000000..8f01bec496 --- /dev/null +++ b/ext/mcrypt/tests/bug49738.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes) +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %sbug49738.php on line 5