com php-src: Remove redundant components < 0 check: ext/exif/exif.c
| From: | Nikita Popov | Date: | Wed, 09 Oct 2019 12:57:24 +0000 |
| Subject: | com php-src: Remove redundant components < 0 check: ext/exif/exif.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-108827@lists.php.net to get a copy of this message | ||
Commit: d6ca174d5b82b92a5f28e81e85f45c2892949cf7
Author: Nikita Popov <nikita.ppv@gmail.com> Wed, 9 Oct 2019 14:57:24 +0200
Parents: a8f60ac9dd3ba8fed24370799603b92487fdf362
Branches: PHP-7.2 PHP-7.3 PHP-7.4 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d6ca174d5b82b92a5f28e81e85f45c2892949cf7
Log:
Remove redundant components < 0 check
components is an unsigned number, it cannot be smaller than zero.
Changed paths:
M ext/exif/exif.c
Diff:
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index 9b4adffb434..b47e55fba1b 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -3294,11 +3294,6 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry,
cha
/*return TRUE;*/
}
- if (components < 0) {
- exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, ImageInfo, E_WARNING,
"Process tag(x%04X=%s): Illegal components(%d)", tag, exif_get_tagname(tag, tagname, -12,
tag_table), components);
- return FALSE;
- }
-
byte_count_signed = (int64_t)components * php_tiff_bytes_per_format[format];
if (byte_count_signed < 0 || (byte_count_signed > INT32_MAX)) {