com php-src: Merge branch 'PHP-7.3' into PHP-7.4: ext/exif/exif.c ext/phar/phar.c ext/spl/spl_directory.c

From: Date: Mon, 04 Mar 2019 06:20:49 +0000
Subject: com php-src: Merge branch 'PHP-7.3' into PHP-7.4: ext/exif/exif.c ext/phar/phar.c ext/spl/spl_directory.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-104969@lists.php.net to get a copy of this message
Commit: 534a18c08ff3f80eebd01b83b782b2a62f7639a4 Author: Stanislav Malyshev <stas@php.net> Sun, 3 Mar 2019 22:20:49 -0800 Parents: cb77d9c3cc1deb36cd18c661ae37e7a6c712449b e3f7c352dce5c63d75976f428f7ff9a160c2be4f Branches: PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=534a18c08ff3f80eebd01b83b782b2a62f7639a4 Log: Merge branch 'PHP-7.3' into PHP-7.4 * PHP-7.3: Update NEWS Fix test error message Fix bug #77563 - Uninitialized read in exif_process_IFD_in_MAKERNOTE Fix bug #77540 - Invalid Read on exif_process_SOFn Fix integer overflows on 32-bits Fix #77431 SplFileInfo::__construct() accepts NUL bytes Fix bug #77396 - Null Pointer Dereference in phar_create_or_parse_filename Bugs: https://bugs.php.net/77563 https://bugs.php.net/77540 https://bugs.php.net/77431 https://bugs.php.net/77396 Changed paths: MM ext/exif/exif.c MM ext/phar/phar.c MM ext/spl/spl_directory.c Diff: diff --cc ext/exif/exif.c index 982c463,1b7d0cc..7482194 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@@ -4655,13 -4660,18 +4660,15 @@@ PHP_FUNCTION(exif_thumbnail ZVAL_STRINGL(return_value, ImageInfo.Thumbnail.data, ImageInfo.Thumbnail.size); if (arg_c >= 3) { if (!ImageInfo.Thumbnail..width || !ImageInfo.Thumbnail.height) { - exif_scan_thumbnail(&ImageInfo); + if (!exif_scan_thumbnail(&ImageInfo)) { + ImageInfo.Thumbnail.width = ImageInfo.Thumbnail.height = 0; + } } - zval_ptr_dtor(z_width); - zval_ptr_dtor(z_height); - ZVAL_LONG(z_width, ImageInfo.Thumbnail.width); - ZVAL_LONG(z_height, ImageInfo.Thumbnail.height); + ZEND_TRY_ASSIGN_LONG(z_width, ImageInfo.Thumbnail.width); + ZEND_TRY_ASSIGN_LONG(z_height, ImageInfo.Thumbnail.height); } if (arg_c >= 4) { - zval_ptr_dtor(z_imagetype); - ZVAL_LONG(z_imagetype, ImageInfo.Thumbnail.filetype); + ZEND_TRY_ASSIGN_LONG(z_imagetype, ImageInfo.Thumbnail.filetype); } #ifdef EXIF_DEBUG

« previous php.cvs (#104969) next »