Skip to content

Commit de9734a

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fix #80880: SSL_read on shutdown, ftp/proc_open
2 parents 304190c + 9688071 commit de9734a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ PHP NEWS
1818
. Fixed bug #80024 (Duplication of info about inherited socket after pool
1919
removing). (Jakub Zelenka)
2020

21+
- FTP:
22+
. Fixed bug #80880 (SSL_read on shutdown, ftp/proc_open). (cmb, Jakub
23+
Zelenka)
24+
2125
- LibXML:
2226
. Fixed bug #73533 (Invalid memory access in php_libxml_xmlCheckUTF8). (cmb)
2327

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)