Skip to content

Commit d6ca174

Browse files
committed
Remove redundant components < 0 check
components is an unsigned number, it cannot be smaller than zero.
1 parent a8f60ac commit d6ca174

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

ext/exif/exif.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3294,11 +3294,6 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha
32943294
/*return TRUE;*/
32953295
}
32963296

3297-
if (components < 0) {
3298-
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);
3299-
return FALSE;
3300-
}
3301-
33023297
byte_count_signed = (int64_t)components * php_tiff_bytes_per_format[format];
33033298

33043299
if (byte_count_signed < 0 || (byte_count_signed > INT32_MAX)) {

0 commit comments

Comments
 (0)