xref: /PHP-7.1/ext/mcrypt/tests/bug35496.phpt (revision dadef203)
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--
12Deprecated: Function mcrypt_module_open() is deprecated in %s%ebug35496.php on line 2
13
14Deprecated: Function mcrypt_generic() is deprecated in %s%ebug35496.php on line 3
15
16Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %sbug35496.php on line 3
17
18Deprecated: Function mdecrypt_generic() is deprecated in %s%ebug35496.php on line 4
19
20Warning: mdecrypt_generic(): Operation disallowed prior to mcrypt_generic_init(). in %sbug35496.php on line 4
21