xref: /PHP-8.3/ext/mysqli/tests/bug38710.phpt (revision a21edc52)
1--TEST--
2Bug #38710 (data leakage because of nonexisting boundary checking in statements)
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7require_once 'skipifconnectfailure.inc';
8?>
9--FILE--
10<?php
11require_once 'connect.inc';
12
13$db = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
14$qry=$db->stmt_init();
15$qry->prepare("SELECT REPEAT('a',100000)");
16$qry->execute();
17$qry->bind_result($text);
18$qry->fetch();
19if ($text !== str_repeat('a', 100000)) {
20    var_dump(strlen($text));
21}
22echo "Done";
23?>
24--EXPECT--
25Done
26