]> granicus.if.org Git - php/commitdiff
- Added test case for bug #41252.
authorDerick Rethans <derick@php.net>
Tue, 1 May 2007 16:04:16 +0000 (16:04 +0000)
committerDerick Rethans <derick@php.net>
Tue, 1 May 2007 16:04:16 +0000 (16:04 +0000)
ext/mcrypt/tests/bug41252.phpt [new file with mode: 0644]

diff --git a/ext/mcrypt/tests/bug41252.phpt b/ext/mcrypt/tests/bug41252.phpt
new file mode 100644 (file)
index 0000000..481fc54
--- /dev/null
@@ -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!