You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
exif_read_data warns about Illegal IFD size on some images #11020
exif_offset_info_contains() fails, and so the warning is triggered, and we return false. It seems to me that 082aecf correctly inserted the length check, but should have returned true (without warning). If I make this change, I get this var_dump() output
@cmb69 Looks good to me, thanks! I've only skimmed through the dumped array, but it looks like it still has all the EXIF tags, and gets rid of the warning.
Activity
ndossche commentedon Apr 5, 2023
I can reproduce this on 8.1+
It's this if that is hit: https://github.com/php/php-src/blob/master/ext/exif/exif.c#L3630-L3633
When trying to check the offset, the offset is at the end, which will make the if branch execute.
cmb69 commentedon Jan 21, 2025
Problem is here:
php-src/ext/exif/exif.c
Lines 3639 to 3646 in 1aaf2b1
exif_offset_info_contains()fails, and so the warning is triggered, and we return false. It seems to me that 082aecf correctly inserted the length check, but should have returned true (without warning). If I make this change, I get thisvar_dump()outputexif1.txt
which looks pretty good.
@akkana, can you confirm that this is pretty much what you would expect?
akkana commentedon Jan 21, 2025
@cmb69 Looks good to me, thanks! I've only skimmed through the dumped array, but it looks like it still has all the EXIF tags, and gets rid of the warning.
cmb69 commentedon Jan 21, 2025
Yeah, it even has a couple more. :)
Merge branch 'PHP-8.5'
ext/exif: Fix phpGH-11020: spurious "Illegal IFD size" warning in exi…
Merge branch 'PHP-8.4' into PHP-8.5