1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-7.2' into PHP-7.3

* PHP-7.2:
  Fix test
  Fix bug #78793
This commit is contained in:
Stanislav Malyshev
2019-12-16 10:04:03 -08:00
3 changed files with 16 additions and 3 deletions

View File

@@ -3213,8 +3213,9 @@ static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * valu
}
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;
}
}

View File

@@ -70,7 +70,7 @@ Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal f
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal format code 0x3030, suppose BYTE in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal pointer offset(x30303030 + x30303030 = x60606060 > x00EE) in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): Process tag(x3030=UndefinedTa): Illegal pointer offset(x30303030 + x30303030 = x60606060 > %s) in %sbug76557.php on line %d
Warning: exif_read_data(bug76557.jpg): File structure corrupted in %sbug76557.php on line %d

View File

@@ -0,0 +1,12 @@
--TEST--
Bug #78793: Use-after-free in exif parsing under memory sanitizer
--FILE--
<?php
$f = "ext/exif/tests/bug77950.tiff";
for ($i = 0; $i < 10; $i++) {
@exif_read_data($f);
}
?>
===DONE===
--EXPECT--
===DONE===