[php-src] PR #23426: sapi/lsapi: fix sapi_lsapi_ub_write() return value on short write

From: Date: Sun, 23 Aug 2026 20:16:00 +0000
Subject: [php-src] PR #23426: sapi/lsapi: fix sapi_lsapi_ub_write() return value on short write
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-38092@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/23426 Author: lazerg sapi_lsapi_ub_write() returns str_length - ret when LSAPI_Write() writes fewer bytes than requested. LSAPI_Write() already returns the number of bytes it wrote (LSAPI_Write_r() in lsapilib.c returns p - pBuf, or -1 on error), the same contract every other ub_write in this codebase follows, e.g. sapi_cli_ub_write() returns ptr - str. Subtracting that count from str_length gives the wrong value. Return ret instead. Fixes #23424

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