[pull] master from php:master#821
Merged
Merged
Conversation
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
* PHP-8.4: Ignore leading namespace separator in ReflectionParameter::__construct()
* PHP-8.5: Ignore leading namespace separator in ReflectionParameter::__construct()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )