com php-src: Fixed bug #71527 Buffer over-write in finfo_open with malformed magic file: ext/fileinfo/tests/bug 68996.phpt
| From: | Anatol Belski | Date: | Tue, 29 Mar 2016 11:11:25 +0000 |
| Subject: | com php-src: Fixed bug #71527 Buffer over-write in finfo_open with malformed magic file: ext/fileinfo/tests/bug 68996.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-91534@lists.php.net to get a copy of this message | ||
Commit: 5272184a1ed0c5c6144e80bed6fb1951601ec3bc
Author: Anatol Belski <ab@php.net> Mon, 28 Mar 2016 00:45:19 +0200
Parents: 84990ab346d6f44055b8e743cf12421534591023
Branches: PHP-5.6 PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5272184a1ed0c5c6144e80bed6fb1951601ec3bc
Log:
Fixed bug #71527 Buffer over-write in finfo_open with malformed magic file
The actual fix is applying the upstream patch from
https://github.com/file/file/commit/6713ca45e7757297381f4b4cdb9cf5e624a9ad36
Bugs:
https://bugs.php.net/71527
Changed paths:
M ext/fileinfo/tests/bug68996.phpt
Diff:
diff --git a/ext/fileinfo/tests/bug68996.phpt b/ext/fileinfo/tests/bug68996.phpt
index 9fa2190..da208d3 100644
--- a/ext/fileinfo/tests/bug68996.phpt
+++ b/ext/fileinfo/tests/bug68996.phpt
@@ -1,14 +1,11 @@
--TEST--
Bug #68996 (Invalid free of CG(interned_empty_string))
--SKIPIF--
-<?php
-if (getenv("USE_ZEND_ALLOC") !== "0") {
- print "skip Need Zend MM disabled";
-}
-?>
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
--INI--
html_errors=1
+--ENV--
+USE_ZEND_ALLOC=0
--FILE--
<?php
finfo_open(FILEINFO_MIME_TYPE, "\xfc\x63");
@@ -19,4 +16,4 @@ finfo_open(FILEINFO_MIME_TYPE, "\xfc\x63");
<br />
<b>Warning</b>: : failed to open stream: No such file or directory in
<b>%sbug68996.php</b> on line <b>%d</b><br />
<br />
-<b>Warning</b>: finfo_open(): in <b>%sbug68996.php</b> on line
<b>%d</b><br />
+<b>Warning</b>: finfo_open(): Failed to load magic database at '%s�c'. in
<b>%sbug68996.php</b> on line <b>%d</b><br />