2005-11-30 23:53:47 +00:00
|
|
|
--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', '');
|
2006-11-15 22:51:45 +00:00
|
|
|
mcrypt_generic($td, b"foobar");
|
|
|
|
mdecrypt_generic($td, b"baz");
|
2005-11-30 23:53:47 +00:00
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2006-10-08 13:34:24 +00:00
|
|
|
Warning: mcrypt_generic(): Operation disallowed prior to mcrypt_generic_init() in %s/bug35496.php on line 3
|
2005-11-30 23:53:47 +00:00
|
|
|
|
2006-10-08 13:34:24 +00:00
|
|
|
Warning: mdecrypt_generic(): Operation disallowed prior to mcrypt_generic_init() in %s/bug35496.php on line 4
|