Skip to content

ext/pdo_firebird: Bound DPB construction - #379

Closed
iliaal wants to merge 1 commit into
PHP-8.4from
fix/aph-pdo-firebird-dpb-overflow-x63u-84-work
Closed

iliaal wants to merge 1 commit into
PHP-8.4from
fix/aph-pdo-firebird-dpb-overflow-x63u-84-work

Conversation

@iliaal

@iliaal iliaal commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Reserve Firebird DPB capacity for its version and terminator bytes, and reject values that exceed the one-byte length encoding or remaining capacity.

slprintf() stores its terminating NUL within the size it is given, and the
DPB is written from offset 1 of a 256-byte buffer with a size of 256, so a
user name, password, charset, or role that filled the buffer wrote one byte
past its end. A value longer than 255 bytes also had its one-byte length
truncated. Reject such values with a PDOException before writing them.
@iliaal
iliaal force-pushed the fix/aph-pdo-firebird-dpb-overflow-x63u-84-work branch from 594c244 to e00aab5 Compare November 7, 2026 16:57
@iliaal

iliaal commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Promoted upstream as php#25292.

@iliaal iliaal closed this Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant