diff options
Diffstat (limited to 'ext/mcrypt/tests/bug35496.phpt')
| -rw-r--r-- | ext/mcrypt/tests/bug35496.phpt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/mcrypt/tests/bug35496.phpt b/ext/mcrypt/tests/bug35496.phpt new file mode 100644 index 000000000..9d94ba4ca --- /dev/null +++ b/ext/mcrypt/tests/bug35496.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #35496 (Crash in mcrypt_generic()/mdecrypt_generic() without proper init). +--SKIPIF-- +<?php if (!extension_loaded("mcrypt")) print "skip"; ?> +--FILE-- +<?php +$td = mcrypt_module_open('rijndael-256', '', 'ofb', ''); +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: mdecrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %s/bug35496.php on line 4 |
