Skip to content

Commit b578580

Browse files
committed
Same issue as #72926 in another place.
1 parent d1fbc98 commit b578580

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/exif/exif.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3734,8 +3734,11 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse
37343734
fgot = php_stream_read(ImageInfo->infile, ImageInfo->Thumbnail.data, ImageInfo->Thumbnail.size);
37353735
if (fgot < ImageInfo->Thumbnail.size) {
37363736
EXIF_ERRLOG_THUMBEOF(ImageInfo)
3737+
efree(ImageInfo->Thumbnail.data);
3738+
ImageInfo->Thumbnail.data = NULL;
3739+
} else {
3740+
exif_thumbnail_build(ImageInfo TSRMLS_CC);
37373741
}
3738-
exif_thumbnail_build(ImageInfo TSRMLS_CC);
37393742
}
37403743
}
37413744
}

0 commit comments

Comments
 (0)