summaryrefslogtreecommitdiffstats
path: root/bug71354.patch
diff options
context:
space:
mode:
Diffstat (limited to 'bug71354.patch')
-rw-r--r--bug71354.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/bug71354.patch b/bug71354.patch
new file mode 100644
index 0000000..7cbafc5
--- /dev/null
+++ b/bug71354.patch
@@ -0,0 +1,28 @@
+Backported from 5.5 for 5.4 by Remi Collet
+binary patch dropped
+
+From 13ad4d3e971807f9a58ab5933182907dc2958539 Mon Sep 17 00:00:00 2001
+From: Stanislav Malyshev <stas@php.net>
+Date: Wed, 13 Jan 2016 16:32:29 -0800
+Subject: [PATCH] Fix bug #71354 - remove UMR when size is 0
+
+---
+ ext/phar/phar_object.c | 1 +
+ ext/phar/tests/bug71354.phpt | 13 +++++++++++++
+ ext/phar/tests/bug71354.tar | Bin 0 -> 1536 bytes
+ 3 files changed, 14 insertions(+)
+ create mode 100644 ext/phar/tests/bug71354.phpt
+ create mode 100644 ext/phar/tests/bug71354.tar
+
+diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c
+index 6d25509..e21a982 100644
+--- a/ext/phar/phar_object.c
++++ b/ext/phar/phar_object.c
+@@ -4977,6 +4977,7 @@ PHP_METHOD(PharFileInfo, getContent)
+
+ phar_seek_efp(link, 0, SEEK_SET, 0, 0 TSRMLS_CC);
+ Z_TYPE_P(return_value) = IS_STRING;
++ Z_STRVAL_P(return_value) = NULL;
+ Z_STRLEN_P(return_value) = php_stream_copy_to_mem(fp, &(Z_STRVAL_P(return_value)), link->uncompressed_filesize, 0);
+
+ if (!Z_STRVAL_P(return_value)) {