Skip to content

Commit 67e545f

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Fix #80880: SSL_read on shutdown, ftp/proc_open
2 parents ecfb888 + de9734a commit 67e545f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/ftp/ftp.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,6 +1886,12 @@ static void ftp_ssl_shutdown(ftpbuf_t *ftp, php_socket_t fd, SSL *ssl_handle) {
18861886
/* SSL wants a write. Really odd. Let's bail out. */
18871887
done = 1;
18881888
break;
1889+
case SSL_ERROR_SYSCALL:
1890+
/* most likely the peer closed the connection without
1891+
sending a close_notify shutdown alert;
1892+
bail out to avoid raising a spurious warning */
1893+
done = 1;
1894+
break;
18891895
default:
18901896
if ((sslerror = ERR_get_error())) {
18911897
ERR_error_string_n(sslerror, buf, sizeof(buf));

0 commit comments

Comments
 (0)