[php-src] PR #22377: ext/ftp: fix off-by-one terminator write in ftp_readline()
| From: | iliaal | Date: | Sun, 21 Jun 2026 11:03:06 +0000 |
| Subject: | [php-src] PR #22377: ext/ftp: fix off-by-one terminator write in ftp_readline() | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36524@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22377
Author: iliaal
A response that fills FTP_BUFSIZE with no CR/LF makes ftp_readline() write its NUL terminator one
byte past inbuf, into the adjacent ftpbuf_t::extra field. Reserve the final byte for the terminator
so it always lands inside inbuf. Regression from the bug80901 fix (09696eee9d43); the SYST reply in
that test is now 4095 visible characters.