summaryrefslogtreecommitdiffstats
path: root/bug72716.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-09-10 10:14:22 +0200
committerRemi Collet <fedora@famillecollet.com>2016-09-10 10:14:22 +0200
commita2713f204e1202b6844c114a005c304aafb008c7 (patch)
treee0c8478be0d2726e338961b37f393bf7b6f50482 /bug72716.patch
parent13f5bfce61ab5fbc1f00236ce3bfb6948054f8db (diff)
PHP 5.5.38 + security patches from 5.6.25
Diffstat (limited to 'bug72716.patch')
-rw-r--r--bug72716.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/bug72716.patch b/bug72716.patch
new file mode 100644
index 0000000..3a6f94a
--- /dev/null
+++ b/bug72716.patch
@@ -0,0 +1,24 @@
+Backported from 5.6.25 by Remi.
+
+From 9c291f0fa0c8b8c6994f521f5863c407494eb1dc Mon Sep 17 00:00:00 2001
+From: Stanislav Malyshev <stas@php.net>
+Date: Wed, 3 Aug 2016 22:59:01 -0700
+Subject: [PATCH] Fix bug #72716 - initialize buffer before read
+
+---
+ ext/standard/ftp_fopen_wrapper.c | 81 ++++++++++++++++++++--------------------
+ 1 file changed, 41 insertions(+), 40 deletions(-)
+
+diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c
+index b7eeb56..0d5384e 100644
+--- a/ext/standard/ftp_fopen_wrapper.c
++++ b/ext/standard/ftp_fopen_wrapper.c
+@@ -82,6 +82,7 @@ typedef struct _php_ftp_dirstream_data {
+ */
+ static inline int get_ftp_result(php_stream *stream, char *buffer, size_t buffer_size TSRMLS_DC)
+ {
++ buffer[0] = '\0'; /* in case read fails to read anything */
+ while (php_stream_gets(stream, buffer, buffer_size-1) &&
+ !(isdigit((int) buffer[0]) && isdigit((int) buffer[1]) &&
+ isdigit((int) buffer[2]) && buffer[3] == ' '));
+