summaryrefslogtreecommitdiff
path: root/ext/dba/tests/bug72157.phpt
blob: 3443f4bb40c9dd970789d0b40d93284fc31883e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Bug #72157 (use-after-free caused by dba_open)
--SKIPIF--
<?php
	require_once(dirname(__FILE__) .'/skipif.inc');
?>
--FILE--
<?php
$var0 = fopen(__FILE__,"r");
$var5 = dba_open(null,$var0);
$var5 = dba_open(null,$var0);
$var5 = dba_open(null,$var0);
$var5 = dba_open($var0,$var0);
?>
--EXPECTF--
Warning: dba_open(,Resource id #5): Illegal DBA mode in %sbug72157.php on line %d

Warning: dba_open(,Resource id #5): Illegal DBA mode in %sbug72157.php on line %d

Warning: dba_open(,Resource id #5): Illegal DBA mode in %sbug72157.php on line %d

Warning: dba_open(Resource id #5,Resource id #5): Illegal DBA mode in %sbug72157.php on line %d