summaryrefslogtreecommitdiffstats
path: root/3666.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2018-11-15 09:26:17 +0100
committerRemi Collet <remi@remirepo.net>2018-11-15 09:26:17 +0100
commit11dd2d528215ac2a5af1f992f86fa9a1796aadcc (patch)
tree8f1f18bce34c8c57fe6a58222b0ed71d4a0b10ac /3666.patch
parentfcf0ed87df34cae9b8d089a4f3262109ab3dc951 (diff)
test build for https://github.com/php/php-src/pull/3666
Diffstat (limited to '3666.patch')
-rw-r--r--3666.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/3666.patch b/3666.patch
new file mode 100644
index 0000000..cd88697
--- /dev/null
+++ b/3666.patch
@@ -0,0 +1,29 @@
+From 7ded74876ff287a4d6d8a12d933e003b61f6488a Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Thu, 15 Nov 2018 08:58:08 +0100
+Subject: [PATCH] Fix #77151 ftp_close(): SSL_read on shutdown
+
+Regression introduced in fix for #76972
+---
+ ext/ftp/ftp.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
+index 88553b969c29..a7d5ebbea13c 100644
+--- a/ext/ftp/ftp.c
++++ b/ext/ftp/ftp.c
+@@ -1770,10 +1770,10 @@ static void ftp_ssl_shutdown(ftpbuf_t *ftp, php_socket_t fd, SSL *ssl_handle) {
+ done = 0;
+ }
+
+- while (!done) {
+- if (data_available(ftp, fd)) {
+- ERR_clear_error();
+- nread = SSL_read(ssl_handle, buf, sizeof(buf));
++ while (!done && data_available(ftp, fd)) {
++ ERR_clear_error();
++ nread = SSL_read(ssl_handle, buf, sizeof(buf));
++ if (nread <= 0) {
+ err = SSL_get_error(ssl_handle, nread);
+ switch (err) {
+ case SSL_ERROR_NONE: /* this is not an error */