Skip to content

Commit 5e48bb7

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
2 parents 0508a70 + 9cd365e commit 5e48bb7

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

ext/exif/exif.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3503,9 +3503,11 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
35033503
Subdir_start = offset_base + php_ifd_get32u(value_ptr, ImageInfo->motorola_intel);
35043504
if (Subdir_start < offset_base || Subdir_start > offset_base+IFDlength) {
35053505
exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING, "Illegal IFD Pointer");
3506+
EFREE_IF(outside);
35063507
return FALSE;
35073508
}
35083509
if (!exif_process_IFD_in_JPEG(ImageInfo, Subdir_start, offset_base, IFDlength, displacement, sub_section_index, tag)) {
3510+
EFREE_IF(outside);
35093511
return FALSE;
35103512
}
35113513
#ifdef EXIF_DEBUG
46 Bytes
Loading
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--TEST--
2+
OSS-Fuzz: Temporary buffer leak in tag reading
3+
--FILE--
4+
<?php
5+
6+
var_dump(@exif_read_data(__DIR__ . '/temporary_buffer_leak.jpg'));
7+
8+
?>
9+
--EXPECT--
10+
bool(false)

0 commit comments

Comments
 (0)