File tree Expand file tree Collapse file tree 5 files changed +22
-2
lines changed Expand file tree Collapse file tree 5 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 77 UNIX sockets). (Mike)
88 . Fixed bug #66182 (exit in stream filter produces segfault). (Mike)
99 . Fixed bug #66736 (fpassthru broken). (Mike)
10+ . Fixed bug #67024 (getimagesize should recognize BMP files with negative
11+ height). (Gabor Buella)
1012 . Fixed bug #67043 (substr_compare broke by previous change) (Tjerk)
1113
1214- Embed:
Original file line number Diff line number Diff line change @@ -163,6 +163,7 @@ static struct gfxinfo *php_handle_bmp (php_stream * stream TSRMLS_DC)
163163result = (struct gfxinfo * ) ecalloc (1 , sizeof (struct gfxinfo ));
164164result -> width = (((unsigned int )dim [ 7 ]) << 24 ) + (((unsigned int )dim [ 6 ]) << 16 ) + (((unsigned int )dim [ 5 ]) << 8 ) + ((unsigned int ) dim [ 4 ]);
165165result -> height = (((unsigned int )dim [11 ]) << 24 ) + (((unsigned int )dim [10 ]) << 16 ) + (((unsigned int )dim [ 9 ]) << 8 ) + ((unsigned int ) dim [ 8 ]);
166+ result -> height = abs ((int32_t )result -> height );
166167result -> bits = (((unsigned int )dim [15 ]) << 8 ) + ((unsigned int )dim [14 ]);
167168} else {
168169return NULL ;
Original file line number Diff line number Diff line change @@ -23,7 +23,22 @@ GetImageSize()
2323var_dump ($ result );
2424?>
2525--EXPECT--
26- array(12) {
26+ array(13) {
27+ ["test-1pix.bmp"]=>
28+ array(6) {
29+ [0]=>
30+ int(1)
31+ [1]=>
32+ int(1)
33+ [2]=>
34+ int(6)
35+ [3]=>
36+ string(20) "width="1" height="1""
37+ ["bits"]=>
38+ int(24)
39+ ["mime"]=>
40+ string(14) "image/x-ms-bmp"
41+ }
2742 ["test1bpix.bmp"]=>
2843 array(6) {
2944 [0]=>
Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ image_type_to_mime_type()
2525var_dump ($ result );
2626?>
2727--EXPECT--
28- array(12) {
28+ array(13) {
29+ ["test-1pix.bmp"]=>
30+ string(14) "image/x-ms-bmp"
2931 ["test1bpix.bmp"]=>
3032 string(14) "image/x-ms-bmp"
3133 ["test1pix.bmp"]=>
You can’t perform that action at this time.
0 commit comments