File php7-CVE-2019-11050.patch of Package php7

X-Git-Url: http://208.43.231.11:8000/?p=php-src.git;a=blobdiff_plain;f=ext%2Fexif%2Fexif.c;h=7fe055f381d792da9c3a6678647800ab58fa834a;hp=c0be05922fbde95cd9cf62e1f44e2f497f8acafc;hb=c14eb8de974fc8a4d74f3515424c293bc7a40fba;hpb=d348cfb96f2543565691010ade5e0346338be5a7

Index: php-7.2.5/ext/exif/exif.c
===================================================================
--- php-7.2.5.orig/ext/exif/exif.c	2020-01-02 13:11:53.941694004 +0100
+++ php-7.2.5/ext/exif/exif.c	2020-01-02 13:11:53.973694182 +0100
@@ -3231,8 +3231,9 @@ static int exif_process_IFD_in_MAKERNOTE
 	}
 
 	for (de=0;de<NumDirEntries;de++) {
-		if (!exif_process_IFD_TAG(ImageInfo, dir_start + 2 + 12 * de,
-								  offset_base, data_len, displacement, section_index, 0, maker_note->tag_table)) {
+		size_t offset = 2 + 12 * de;
+		if (!exif_process_IFD_TAG(ImageInfo, dir_start + offset,
+								  offset_base, data_len - offset, displacement, section_index, 0, maker_note->tag_table)) {
 			return FALSE;
 		}
 	}
openSUSE Build Service is sponsored by