Commit 9a479812aee for php.net

commit 9a479812aee620a7403ae0ae4081b30ee43f8fd4
Merge: 0c11f486d7e a7539ff8344
Author: Ilia Alshanetsky <ilia@ilia.ws>
Date:   Tue Jul 14 15:46:58 2026 -0400

    Merge branch 'PHP-8.4' into PHP-8.5

    * PHP-8.4:
      Fix GH-22666: pdo_odbc heap overflow on oversized output param

diff --cc ext/pdo_odbc/odbc_stmt.c
index 4aca921f01a,8940143da09..a0b008cdd9d
--- a/ext/pdo_odbc/odbc_stmt.c
+++ b/ext/pdo_odbc/odbc_stmt.c
@@@ -504,8 -514,11 +512,11 @@@ static int odbc_stmt_param_hook(pdo_stm
  					zval_ptr_dtor(parameter);

  					if (P->len >= 0) {
+ 							if (P->len > P->outbuflen) {
+ 								P->len = P->outbuflen;
+ 							}
  							ZVAL_STRINGL(parameter, P->outbuf, P->len);
 -							switch (pdo_odbc_ucs22utf8(stmt, P->is_unicode, parameter)) {
 +							switch (pdo_odbc_ucs22utf8(P->is_unicode, parameter)) {
  								case PDO_ODBC_CONV_FAIL:
  									/* something fishy, but allow it to come back as binary */
  								case PDO_ODBC_CONV_NOT_REQUIRED: