[php-src] PR #22512: Fix GH-20726: crash in pdo_odbc with pooling and no credentials

From: Date: Mon, 29 Jun 2026 14:11:10 +0000
Subject: [php-src] PR #22512: Fix GH-20726: crash in pdo_odbc with pooling and no credentials
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-36731@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/22512 Author: iliaal pdo_odbc passed dbh->username and dbh->password straight to SQLConnect, and both are NULL when the DSN carries no credentials. With ODBC connection pooling enabled, the unixODBC driver manager runs strcmp() on the cached and requested credentials while matching a pooled connection, dereferences the NULL, and crashes inside SQLConnect. Passing empty strings avoids it. Reproduced on PHP-8.4 against the MDBTools driver with pooling enabled: a connect/close loop SIGSEGVs unpatched and runs clean patched. This hardens the PHP side only; the residual fault under pooling is an uninitialised-value read inside unixODBC's own pool bookkeeping and belongs upstream. Refs #20726

« previous php.git-pulls (#36731) next »