[php-src] PR #22776: ext/odbc: do not mutate the caller's DSN string
| From: | iliaal | Date: | Thu, 16 Jul 2026 20:41:16 +0000 |
| Subject: | [php-src] PR #22776: ext/odbc: do not mutate the caller's DSN string | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-37108@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22776
Author: iliaal
odbc_sqlconnect() stripped a trailing ; by writing a NUL into the
caller’s DSN zend_string. Shared variables, interned literals, and const
values used as the DSN were permanently altered (strlen unchanged, last byte became
NUL).
Compute a base length instead and pass it to spprintf with %.*s. Does not
touch the argument buffer.
ext/pdo_odbc already copies before mutating and does not need a change.