Skip to content

Commit 63cb47a

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Fix #79687: Sony picture - PHP Warning - Make, Model, MakerNotes
2 parents 7938236 + 59e343c commit 63cb47a

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

ext/exif/exif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3169,7 +3169,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
31693169
if (value_len < 2 || maker_note->offset >= value_len - 1) {
31703170
/* Do not go past the value end */
31713171
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "IFD data too short: 0x%04X offset 0x%04X", value_len, maker_note->offset);
3172-
return FALSE;
3172+
return TRUE;
31733173
}
31743174

31753175
dir_start = value_ptr + maker_note->offset;

ext/exif/tests/bug77563.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ DONE
1010
--EXPECTF--
1111
Warning: exif_thumbnail(bug77563.jpg): IFD data too short: 0x0009 offset 0x0008 in %s%ebug77563.php on line %d
1212

13+
Warning: exif_thumbnail(bug77563.jpg): Illegal IFD offset in %s%ebug77563.php on line %d
14+
1315
Warning: exif_thumbnail(bug77563.jpg): File structure corrupted in %s%ebug77563.php on line %d
1416

1517
Warning: exif_thumbnail(bug77563.jpg): Invalid JPEG file in %s%ebug77563.php on line %d

ext/exif/tests/bug78910.phpt

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,32 @@ Warning: exif_read_data(): Process tag(x927C=MakerNote): Illegal format code 0x2
1313

1414
Warning: exif_read_data(): IFD data too short: 0x0000 offset 0x000C in %s on line %d
1515

16-
Warning: exif_read_data(): Invalid TIFF file in %s on line %d
17-
bool(false)
16+
Warning: exif_read_data(): Error in TIFF: filesize(x002A) less than start of IFD dir(x46494C4F) in %s on line %d
17+
array(8) {
18+
["FileDateTime"]=>
19+
int(0)
20+
["FileSize"]=>
21+
int(42)
22+
["FileType"]=>
23+
int(8)
24+
["MimeType"]=>
25+
string(10) "image/tiff"
26+
["SectionsFound"]=>
27+
string(13) "ANY_TAG, IFD0"
28+
["COMPUTED"]=>
29+
array(2) {
30+
["IsColor"]=>
31+
int(0)
32+
["ByteOrderMotorola"]=>
33+
int(1)
34+
}
35+
["Make"]=>
36+
array(2) {
37+
[0]=>
38+
int(1179994697)
39+
[1]=>
40+
int(1179208781)
41+
}
42+
["MakerNote"]=>
43+
NULL
44+
}

0 commit comments

Comments
 (0)