Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #79687: Sony picture - PHP Warning - Make, Model, MakerNotes #5709

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/exif/exif.c
Expand Up @@ -3147,7 +3147,7 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
if (value_len < 2 || maker_note->offset >= value_len - 1) {
/* Do not go past the value end */
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);
return FALSE;
return TRUE;
}

dir_start = value_ptr + maker_note->offset;
Expand Down
2 changes: 2 additions & 0 deletions ext/exif/tests/bug77563.phpt
Expand Up @@ -10,6 +10,8 @@ DONE
--EXPECTF--
Warning: exif_thumbnail(bug77563.jpg): IFD data too short: 0x0009 offset 0x0008 in %s%ebug77563.php on line %d

Warning: exif_thumbnail(bug77563.jpg): Illegal IFD offset in %s%ebug77563.php on line %d

Warning: exif_thumbnail(bug77563.jpg): File structure corrupted in %s%ebug77563.php on line %d

Warning: exif_thumbnail(bug77563.jpg): Invalid JPEG file in %s%ebug77563.php on line %d
Expand Down
31 changes: 29 additions & 2 deletions ext/exif/tests/bug78910.phpt
Expand Up @@ -13,5 +13,32 @@ Warning: exif_read_data(): Process tag(x927C=MakerNote ): Illegal format code 0

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

Warning: exif_read_data(): Invalid TIFF file in %s on line %d
bool(false)
Warning: exif_read_data(): Error in TIFF: filesize(x002A) less than start of IFD dir(x46494C4F) in %s on line %d
array(8) {
["FileDateTime"]=>
int(0)
["FileSize"]=>
int(42)
["FileType"]=>
int(8)
["MimeType"]=>
string(10) "image/tiff"
["SectionsFound"]=>
string(13) "ANY_TAG, IFD0"
["COMPUTED"]=>
array(2) {
["IsColor"]=>
int(0)
["ByteOrderMotorola"]=>
int(1)
}
["Make"]=>
array(2) {
[0]=>
int(1179994697)
[1]=>
int(1179208781)
}
["MakerNote"]=>
NULL
}