summaryrefslogtreecommitdiff
path: root/ext/mcrypt/tests
diff options
context:
space:
mode:
authorSriram Natarajan <srinatar@php.net>2009-10-02 00:13:53 +0000
committerSriram Natarajan <srinatar@php.net>2009-10-02 00:13:53 +0000
commit0f57b15e23758b0e1a1bdfe9260b50bcdb9750f2 (patch)
tree9ad1071b515b6e9dd4cb21191260ae0e8729624c /ext/mcrypt/tests
parenta71da78442ec6f32ed217a002ece700833f5c1ea (diff)
downloadphp-git-0f57b15e23758b0e1a1bdfe9260b50bcdb9750f2.tar.gz
- Fixed bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes).
Diffstat (limited to 'ext/mcrypt/tests')
-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 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--
+<?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