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