diff options
Diffstat (limited to 'ext/mcrypt/tests')
| -rw-r--r-- | ext/mcrypt/tests/bug35496.phpt | 4 | ||||
| -rw-r--r-- | ext/mcrypt/tests/bug41252.phpt | 13 |
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! |
