History log of /php-src/ext/ftp/tests/gh10562.phpt (Results 1 – 1 of 1)
Revision Date Author Comments
# c962a96c 06-Jul-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-10562: Memory leak and invalid state with consecutive ftp_nb_fget

When the user does not fully consume the data stream, but instead opens
a new one, a memory leak occurs. Moreover

Fix GH-10562: Memory leak and invalid state with consecutive ftp_nb_fget

When the user does not fully consume the data stream, but instead opens
a new one, a memory leak occurs. Moreover, the state is invalid: when
more commands arrive they'll be handled out-of-sync because the state of
the client does not match what the server is doing.
This leads to all sorts of weirdness, for example:
Warning: ftp_nb_fget(): OK.

Fix it by gracefully closing the old data stream when a new data stream
is started.

Closes GH-11606.

show more ...