Skip to content

[pull] master from php:master#830

Merged
pull[bot] merged 12 commits into
dolfly:masterfrom
php:master
Jun 17, 2026
Merged

[pull] master from php:master#830
pull[bot] merged 12 commits into
dolfly:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented Jun 17, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

iliaal and others added 12 commits June 17, 2026 06:47
When the connection string specified an unrecognized TDS version,
pdo_dblib_handle_factory() wrote the message to stdout via printf()
before raising the proper PDO error, corrupting SAPI output. The
pdo_raise_impl_error() call right below already reports the condition;
drop the printf().

Closes GH-22345
* PHP-8.4:
  Remove stray printf() on invalid DSN version in pdo_dblib
* PHP-8.5:
  Remove stray printf() on invalid DSN version in pdo_dblib
dblib_handle_last_id() converted the @@IDENTITY value into a 32-byte
buffer with dbconvert()'s destination length set to -1, which disables
FreeTDS's destination bounds check. A numeric(p,0) IDENTITY column with
precision over ~30 produces a textual form longer than 32 bytes,
overflowing the buffer. Size the buffer for the widest @@IDENTITY
(numeric(38,0): 38 digits, sign, NUL) and pass the real destination
length so dbconvert() stays in bounds, mirroring the explicit-destlen
fix already in pdo_dblib_stmt_stringify_col().

Closes GH-22348
* PHP-8.4:
  Fix buffer overflow converting @@IDENTITY in pdo_dblib lastInsertId
* PHP-8.5:
  Fix buffer overflow converting @@IDENTITY in pdo_dblib lastInsertId
Strip a leading '\\' before lowercasing, matching ReflectionFunction::__construct().

Fixes GH-22324
Closes GH-22325
* PHP-8.4:
  Ignore leading namespace separator in ReflectionParameter::__construct()
* PHP-8.5:
  Ignore leading namespace separator in ReflectionParameter::__construct()
The AST pretty-printer single-quoted string literals and appended bytes
verbatim, so a NUL in a literal survived into the string assert() passes
to zend_throw_exception() as a const char*, truncating the failure
message at the first NUL. Export literals containing a control byte
double-quoted via zend_ast_export_qstr(), which escapes them as octal;
literals without control bytes are unchanged.

Fixes GH-22290
Closes GH-22350
* PHP-8.4:
  zend_ast: Escape control bytes in exported string literals
* PHP-8.5:
  zend_ast: Escape control bytes in exported string literals
@pull pull Bot locked and limited conversation to collaborators Jun 17, 2026
@pull pull Bot added the ⤵️ pull label Jun 17, 2026
@pull pull Bot merged commit 278137c into dolfly:master Jun 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants