com php-src: Fixed bug #68731 finfo_buffer doesn't extr act the correct mime with some gifs: NEWS ext /fileinfo/tests/68731.gif ext/fileinfo/tests/bug
68731.phpt
| From: | Anatol Belski | Date: | Thu, 22 Jan 2015 11:26:50 +0000 |
| Subject: | com php-src: Fixed bug #68731 finfo_buffer doesn't extr act the correct mime with some gifs: NEWS ext /fileinfo/tests/68731.gif ext/fileinfo/tests/bug 68731.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84314@lists.php.net to get a copy of this message | ||
Commit: 093a23d1c4d8a6a986211aa00b672dc3392f438a
Author: Anatol Belski <ab@php.net> Thu, 22 Jan 2015 12:26:50 +0100
Parents: c9d0894ec5872f035bb2d6f1ad78fbcdf2cf20ff
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=093a23d1c4d8a6a986211aa00b672dc3392f438a
Log:
Fixed bug #68731 finfo_buffer doesn't extract the correct mime with some gifs
The fix for bug #67647 applies here, too.
Bugs:
https://bugs.php.net/68731
https://bugs.php.net/67647
Changed paths:
M NEWS
A ext/fileinfo/tests/68731.gif
A ext/fileinfo/tests/bug68731.phpt
Diff:
diff --git a/NEWS b/NEWS
index f83cab8..0162123 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@
. Fixed bug #68827 (Double free with disabled ZMM). (Joshua Rogers)
. Fixed bug #67647 (Bundled libmagic 5.17 does not detect quicktime files
correctly). (Anatol)
+ . Fixed bug #68731 (finfo_buffer doesn't extract the correct mime with some
+ gifs). (Anatol)
- Opcache:
. Fixed bug with try blocks being removed when extended_info opcode
diff --git a/ext/fileinfo/tests/68731.gif b/ext/fileinfo/tests/68731.gif
new file mode 100644
index 0000000..328e552
Binary files /dev/null and b/ext/fileinfo/tests/68731.gif differ
diff --git a/ext/fileinfo/tests/bug68731.phpt b/ext/fileinfo/tests/bug68731.phpt
new file mode 100644
index 0000000..cba7909
--- /dev/null
+++ b/ext/fileinfo/tests/bug68731.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Bug #68731 finfo_buffer doesn't extract the correct mime with some gifs
+--SKIPIF--
+<?php
+if (!class_exists('finfo'))
+ die('skip no fileinfo extension');
+--FILE--
+<?php
+ $buffer = file_get_contents(dirname(__FILE__) . '/68731.gif');
+ $finfo = finfo_open(FILEINFO_MIME_TYPE);
+ echo finfo_buffer($finfo, $buffer);
+?>
+--EXPECT--
+image/gif