Skip to content

Commit

Permalink
Remove redundant components < 0 check
Browse files Browse the repository at this point in the history
components is an unsigned number, it cannot be smaller than zero.
  • Loading branch information
nikic committed Oct 9, 2019
1 parent a8f60ac commit d6ca174
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions ext/exif/exif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit d6ca174

Please sign in to comment.