Although the ICC specifications say to check for this, libtiff doesn't and neither does any other TIFF implementation, and the TIFF specs say that Photoshop has a different way to encapsulate ICC profiles, and are asking for advice on how to deal with it. So basically, photoshop puts a different type than what's specified, no other implementation checks for this, we do because we tried to follow the specs although its harmless to not, and ran into this bug because we didn't know about it.
Unified · Split
| @@ -1682,9 +1682,6 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) · 1681 unmodified lines | ||
| 1682 | 1682 | } |
| 1683 | 1683 | break; |
| 1684 | 1684 | case TIFF_ICC_PROFILE: |
| 1685 | − if (type != TIFF_UNDEFINED) | |
| 1686 | − return AVERROR_INVALIDDATA; | |
| 1687 | − | |
| 1688 | 1685 | gb_temp = s->gb; |
| 1689 | 1686 | bytestream2_seek(&gb_temp, SEEK_SET, off); |
| 1690 | 1687 | |