summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--3666.patch29
-rw-r--r--php.spec7
2 files changed, 35 insertions, 1 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 */
diff --git a/php.spec b/php.spec
index f53cb18..6319d2b 100644
--- a/php.spec
+++ b/php.spec
@@ -126,7 +126,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: %{?scl_prefix}php
Version: %{upver}%{?rcver:~%{rcver}}
-Release: 1%{?dist}
+Release: 2%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -195,6 +195,7 @@ Patch300: php-7.0.10-datetests.patch
Patch301: php-7.0.0-oldpcre.patch
# WIP
+Patch400: https://patch-diff.githubusercontent.com/raw/php/php-src/pull/3666.patch
BuildRequires: bzip2-devel, curl-devel >= 7.9, %{db_devel}
BuildRequires: httpd-devel >= 2.0.46-1, pam-devel
@@ -918,6 +919,7 @@ if ! pkg-config libpcre --atleast-version 8.34 ; then
%patch301 -p1 -b .pcre834
fi
%endif
+%patch400 -p1 -b .pr3666
# WIP patch
@@ -1849,6 +1851,9 @@ fi
%changelog
+* Thu Nov 15 2018 Remi Collet <remi@remirepo.net> - 7.1.24-2
+- test build for https://github.com/php/php-src/pull/3666
+
* Wed Nov 7 2018 Remi Collet <remi@remirepo.net> - 7.1.24-1
- Update to 7.1.24 - http://www.php.net/releases/7_1_24.php