From 22b274864edbc4052b961c5d14beecf665b46c49 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 10 Sep 2016 10:14:22 +0200 Subject: PHP 5.5.38 + security patches from 5.6.25 --- bug72716.patch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 bug72716.patch (limited to 'bug72716.patch') 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 +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] == ' ')); + -- cgit