Skip to content

Commit bf9ad4e

Browse files
committed
1 parent 1e9a3ed commit bf9ad4e

File tree

5 files changed

+26
-8
lines changed

5 files changed

+26
-8
lines changed

NEWS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ PHP NEWS
33
?? ??? 2012, PHP 5.4.12
44

55
- Core:
6-
. Fixed bug #63982 (isset() inconsistently produces a fatal error on
6+
. Fixed bug #63982 (isset() inconsistently produces a fatal error on
77
protected property). (Stas)
88
. Fixed bug #63943 (Bad warning text from strpos() on empty needle).
99
(Laruence)
1010
. Fixed bug #63882 (zend_std_compare_objects crash on recursion). (Dmitry)
11+
. Support BITMAPV5HEADER in getimagesize(). (AsamK, Lars)
1112

1213
- Litespeed:
1314
. Fixed bug #63228 (-Werror=format-security error in lsapi code). (George)
@@ -26,7 +27,7 @@ PHP NEWS
2627
. Fixed bug #63899 (Use after scope error in zend_compile). (Laruence)
2728
. Fixed bug #63762 (Sigsegv when Exception::$trace is changed by user).
2829
(Johannes)
29-
. Fixed bug #43177 (Errors in eval()'ed code produce status code 500).
30+
. Fixed bug #43177 (Errors in eval()'ed code produce status code 500).
3031
(Todd Ruth, Stas).
3132

3233
- Filter:

ext/standard/image.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static struct gfxinfo *php_handle_bmp (php_stream * stream TSRMLS_DC)
159159
result->width = (((unsigned int)dim[ 5]) << 8) + ((unsigned int) dim[ 4]);
160160
result->height = (((unsigned int)dim[ 7]) << 8) + ((unsigned int) dim[ 6]);
161161
result->bits = ((unsigned int)dim[11]);
162-
} else if (size > 12 && (size <= 64 || size == 108)) {
162+
} else if (size > 12 && (size <= 64 || size == 108 || size == 124)) {
163163
result = (struct gfxinfo *) ecalloc (1, sizeof(struct gfxinfo));
164164
result->width = (((unsigned int)dim[ 7]) << 24) + (((unsigned int)dim[ 6]) << 16) + (((unsigned int)dim[ 5]) << 8) + ((unsigned int) dim[ 4]);
165165
result->height = (((unsigned int)dim[11]) << 24) + (((unsigned int)dim[10]) << 16) + (((unsigned int)dim[ 9]) << 8) + ((unsigned int) dim[ 8]);

ext/standard/tests/image/getimagesize.phpt

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,22 @@ GetImageSize()
2323
var_dump($result);
2424
?>
2525
--EXPECT--
26-
array(11) {
26+
array(12) {
27+
["test1bpix.bmp"]=>
28+
array(6) {
29+
[0]=>
30+
int(500)
31+
[1]=>
32+
int(345)
33+
[2]=>
34+
int(6)
35+
[3]=>
36+
string(24) "width="500" height="345""
37+
["bits"]=>
38+
int(32)
39+
["mime"]=>
40+
string(14) "image/x-ms-bmp"
41+
}
2742
["test1pix.bmp"]=>
2843
array(6) {
2944
[0]=>

ext/standard/tests/image/image_type_to_mime_type.phpt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
--TEST--
22
image_type_to_mime_type()
33
--SKIPIF--
4-
<?php
5-
if (!function_exists('image_type_to_mime_type')) die('skip image_type_to_mime_type() not available');
4+
<?php
5+
if (!function_exists('image_type_to_mime_type')) die('skip image_type_to_mime_type() not available');
66
require_once('skipif_imagetype.inc');
77
?>
88
--FILE--
@@ -25,7 +25,9 @@ image_type_to_mime_type()
2525
var_dump($result);
2626
?>
2727
--EXPECT--
28-
array(11) {
28+
array(12) {
29+
["test1bpix.bmp"]=>
30+
string(14) "image/x-ms-bmp"
2931
["test1pix.bmp"]=>
3032
string(14) "image/x-ms-bmp"
3133
["test1pix.jp2"]=>
@@ -48,4 +50,4 @@ array(11) {
4850
string(29) "application/x-shockwave-flash"
4951
["test4pix.tif"]=>
5052
string(10) "image/tiff"
51-
}
53+
}
674 KB
Binary file not shown.

0 commit comments

Comments
 (0)