summaryrefslogtreecommitdiff
path: root/ext/mcrypt/tests/bug49738.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mcrypt/tests/bug49738.phpt')
-rw-r--r--ext/mcrypt/tests/bug49738.phpt13
1 files changed, 13 insertions, 0 deletions
diff --git a/ext/mcrypt/tests/bug49738.phpt b/ext/mcrypt/tests/bug49738.phpt
new file mode 100644
index 000000000..8f01bec49
--- /dev/null
+++ b/ext/mcrypt/tests/bug49738.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes)
+--SKIPIF--
+<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
+--FILE--
+<?php
+ $td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_ECB, '');
+ mcrypt_generic_init($td, 'aaaaaaaa', 'aaaaaaaa');
+ mcrypt_generic_deinit($td);
+ echo mcrypt_generic($td, 'aaaaaaaa');
+?>
+--EXPECTF--
+Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %sbug49738.php on line 5