xref: /PHP-5.4/ext/mcrypt/tests/bug35496.phpt (revision 3657b0ab)
1--TEST--
2Bug #35496 (Crash in mcrypt_generic()/mdecrypt_generic() without proper init).
3--SKIPIF--
4<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
5--FILE--
6<?php
7$td = mcrypt_module_open('rijndael-256', '', 'ofb', '');
8mcrypt_generic($td, "foobar");
9mdecrypt_generic($td, "baz");
10?>
11--EXPECTF--
12Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %sbug35496.php on line 3
13
14Warning: mdecrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %sbug35496.php on line 4
15