mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Merge branch 'PHP-8.3'
* PHP-8.3: Fix GH-15432: Heap corruption when querying a vector
This commit is contained in:
commit
57f02e2aba
3 changed files with 29 additions and 1 deletions
4
NEWS
4
NEWS
|
@ -13,6 +13,10 @@ PHP NEWS
|
||||||
. Fixed bug GH-15456 (Crash in get_class_vars() on virtual properties).
|
. Fixed bug GH-15456 (Crash in get_class_vars() on virtual properties).
|
||||||
(ilutov)
|
(ilutov)
|
||||||
|
|
||||||
|
- MySQLnd:
|
||||||
|
. Fixed bug GH-15432 (Heap corruption when querying a vector). (cmb,
|
||||||
|
Kamil Tekiela)
|
||||||
|
|
||||||
15 Aug 2024, PHP 8.4.0beta3
|
15 Aug 2024, PHP 8.4.0beta3
|
||||||
|
|
||||||
- Core:
|
- Core:
|
||||||
|
|
24
ext/mysqli/tests/gh15432.phpt
Normal file
24
ext/mysqli/tests/gh15432.phpt
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
--TEST--
|
||||||
|
Bug GH-15432 (Heap corruption when querying a vector)
|
||||||
|
--EXTENSIONS--
|
||||||
|
mysqli
|
||||||
|
--SKIPIF--
|
||||||
|
<?php
|
||||||
|
require 'connect.inc';
|
||||||
|
$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
|
||||||
|
if ($link === false) {
|
||||||
|
die(sprintf("skip Can't connect to MySQL Server - [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
|
||||||
|
}
|
||||||
|
if ($link->server_version < 90000 || $link->server_version >= 10_00_00) {
|
||||||
|
die("skip MySQL 9.0.0+ needed");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
--FILE--
|
||||||
|
<?php
|
||||||
|
require 'connect.inc';
|
||||||
|
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
|
||||||
|
var_dump($link->query('SELECT STRING_TO_VECTOR("[1.05, -17.8, 32]")'));
|
||||||
|
?>
|
||||||
|
--EXPECTF--
|
||||||
|
Warning: mysqli::query(): Unknown type 242 sent by the server. Please send a report to the developers in %s on line %d
|
||||||
|
bool(false)
|
|
@ -300,7 +300,7 @@ mysqlnd_query_read_result_set_header(MYSQLND_CONN_DATA * conn, MYSQLND_STMT * s)
|
||||||
if (FAIL == (ret = result->m.read_result_metadata(result, conn))) {
|
if (FAIL == (ret = result->m.read_result_metadata(result, conn))) {
|
||||||
/* For PS, we leave them in Prepared state */
|
/* For PS, we leave them in Prepared state */
|
||||||
if (!stmt && conn->current_result) {
|
if (!stmt && conn->current_result) {
|
||||||
mnd_efree(conn->current_result);
|
conn->current_result->m.free_result(conn->current_result, TRUE);
|
||||||
conn->current_result = NULL;
|
conn->current_result = NULL;
|
||||||
}
|
}
|
||||||
DBG_ERR("Error occurred while reading metadata");
|
DBG_ERR("Error occurred while reading metadata");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue