summaryrefslogtreecommitdiff
path: root/ext/mcrypt/tests
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@debian.(none)>2009-03-25 00:37:27 -0400
committerMark A. Hershberger <mah@debian.(none)>2009-03-25 00:37:27 -0400
commit2d4e5b09576bb4f0ba716cc82cdf29ea04d9184b (patch)
tree41ccc042009cba53e4ce43e727fcba4c1cfbf7f3 /ext/mcrypt/tests
parentd29a4fd2dd3b5d4cf6e80b602544d7b71d794e76 (diff)
downloadphp-upstream/5.2.2.tar.gz
Imported Upstream version 5.2.2upstream/5.2.2
Diffstat (limited to 'ext/mcrypt/tests')
-rw-r--r--ext/mcrypt/tests/bug35496.phpt4
-rw-r--r--ext/mcrypt/tests/bug41252.phpt13
2 files changed, 15 insertions, 2 deletions
diff --git a/ext/mcrypt/tests/bug35496.phpt b/ext/mcrypt/tests/bug35496.phpt
index 9d94ba4ca..3add65e02 100644
--- a/ext/mcrypt/tests/bug35496.phpt
+++ b/ext/mcrypt/tests/bug35496.phpt
@@ -9,6 +9,6 @@ mcrypt_generic($td, "foobar");
mdecrypt_generic($td, "baz");
?>
--EXPECTF--
-Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %s/bug35496.php on line 3
+Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %sbug35496.php on line 3
-Warning: mdecrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %s/bug35496.php on line 4
+Warning: mdecrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %sbug35496.php on line 4
diff --git a/ext/mcrypt/tests/bug41252.phpt b/ext/mcrypt/tests/bug41252.phpt
new file mode 100644
index 000000000..481fc5498
--- /dev/null
+++ b/ext/mcrypt/tests/bug41252.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Bug #41252 (Calling mcrypt_generic without first calling mcrypt_generic_init crashes)
+--SKIPIF--
+<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
+--FILE--
+<?php
+$td = mcrypt_module_open(MCRYPT_DES, '', MCRYPT_MODE_ECB, '');
+echo mcrypt_generic($td,'aaaaaaaa');
+print "I'm alive!\n";
+?>
+--EXPECTF--
+Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %sbug41252.php on line 3
+I'm alive!