From: Marcus Boerger Date: Thu, 4 Nov 2004 20:17:25 +0000 (+0000) Subject: MFH Bug #30627 X-Git-Tag: php-4.3.10RC1~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ac0a29b0465f4f695eda924808629d74c88a7bc8;p=php MFH Bug #30627 --- diff --git a/NEWS b/NEWS index 944bf94834..86c688aa29 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ PHP 4 NEWS - Fixed a bug in addslashes() handling of the '\0' character. (Ilia) - Backported Marcus' foreach() speedup patch from PHP 5.x. (Derick) - Fixed potential problems with unserializing invalid serialize data. (Marcus) +- Fixed bug #30672 (Problem handling exif data in jpeg images at unusual + places). (Marcus) - Fixed bug #30658 (Ensure that temporary files created by GD are removed). (Ilia) - Fixed bug #30654 (oci8 persistent connection is deleted from hash diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 759c285912..05bc1cb90d 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -2712,7 +2712,7 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha // JPEG does not use absolute pointers instead its pointers are relative to the start // of the TIFF header in APP1 section. */ - if (offset_val+byte_count>ImageInfo->FileSize || (ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_II && ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_MM)) { + if (offset_val+byte_count>ImageInfo->FileSize || (ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_II && ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_MM && ImageInfo->FileType!=IMAGE_FILETYPE_JPEG)) { if (value_ptr < dir_entry) { /* we can read this if offset_val > 0 */ /* some files have their values in other parts of the file */