diff options
| author | Stanislav Malyshev <stas@php.net> | 2016-08-08 00:49:34 -0700 |
|---|---|---|
| committer | Stanislav Malyshev <stas@php.net> | 2016-08-16 22:55:40 -0700 |
| commit | 6dbb1ee46b5f4725cc6519abf91e512a2a10dfed (patch) | |
| tree | e0898303087987d9bb29617d75037367d2684e2f /ext/exif/exif.c | |
| parent | 698a691724c0a949295991e5df091ce16f899e02 (diff) | |
| download | php-git-6dbb1ee46b5f4725cc6519abf91e512a2a10dfed.tar.gz | |
Fixed bug #72627: Memory Leakage In exif_process_IFD_in_TIFF
Diffstat (limited to 'ext/exif/exif.c')
| -rw-r--r-- | ext/exif/exif.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/exif/exif.c b/ext/exif/exif.c index f95de3a14f..657a2cc1f2 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -3768,8 +3768,11 @@ static int exif_process_IFD_in_TIFF(image_info_type *ImageInfo, size_t dir_offse fgot = php_stream_read(ImageInfo->infile, ImageInfo->Thumbnail.data, ImageInfo->Thumbnail.size); if (fgot < ImageInfo->Thumbnail.size) { EXIF_ERRLOG_THUMBEOF(ImageInfo) + efree(ImageInfo->Thumbnail.data); + ImageInfo->Thumbnail.data = NULL; + } else { + exif_thumbnail_build(ImageInfo TSRMLS_CC); } - exif_thumbnail_build(ImageInfo TSRMLS_CC); } #ifdef EXIF_DEBUG exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Read next IFD (THUMBNAIL) done"); |
