[php-src] PR #16587: Fix GH-16450: PDO_ODBC can inject garbage into field values
| From: | cmb69 | Date: | Fri, 25 Oct 2024 12:46:16 +0000 |
| Subject: | [php-src] PR #16587: Fix GH-16450: PDO_ODBC can inject garbage into field values | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-29391@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/16587
Author: cmb69
A previous bug fix[1] relied on ODBC drivers to properly count down the
StrLen_or_IndPtr argument for consecutive calls to SQLGetData().
Apparently, not all drivers handle this correctly, so we cannot assert they do. Instead we fall
back to the old behavior for drivers which would violate the assertion.
A test against SQLServer (which we currently use in CI) would not make sense, since the respective
drivers do not exhibit that behavior. Instead we target the regression test especially to a MS
Access database.
Since there is apparently no way to easily create an MS Access database programmatically, we commit
a minimal empty DB which is used for the regression test, and could also be used by other test
cases.
[1] <https://github.com/php/php-src/commit/bccca0b53aa60a62e2988c750fc73c02d109e642>