[php-src] PR #24496: Fix GH-24490: pdo_pgsql prepare() hangs on a query containing a NUL byte

From: Date: Wed, 21 Oct 2026 18:50:36 +0000
Subject: [php-src] PR #24496: Fix GH-24490: pdo_pgsql prepare() hangs on a query containing a NUL byte
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-39667@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/24496 Author: dev-null-undefined No rule in the scanner matches a NUL byte, so what re2c does with one is undefined. Before 5ccc56b1e4 it happened to skip one character. Now it returns a zero-length text token and pdo_parse_params() loops forever, or reads an uninitialized YYMARKER if the NUL is the first byte. Add a default rule so a NUL is skipped as one character of text again. This also gets rid of re2c's -Wundefined-control-flow warning for this scanner. The regression is only on master (GH-24353). The new test hangs without the fix, and the ext/pdo_pgsql tests pass against PostgreSQL 18.6. Fixes #24490

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