Message ID | CAB0OVGr9Z2QT8PGKF6yAN71rGCqbcTmyJdWE+iWMv+NoXuZjBQ@mail.gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [FFmpeg-devel] lavc/tiff: Do not fail for an ICC profile with invalid type | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
Sep 5, 2020, 18:24 by ceffmpeg@gmail.com: > Hi! > > Attached patch fixes ticket 8884. > > Please comment, Carl Eugen > Just posted a patch which fixes the problem and allows parsing of such files instead. Tested and works on #8884's samples.
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 8a42e677ce..81e9a60bdf 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1682,8 +1682,10 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) } break; case TIFF_ICC_PROFILE: - if (type != TIFF_UNDEFINED) - return AVERROR_INVALIDDATA; + if (type != TIFF_UNDEFINED) { + av_log(s->avctx, AV_LOG_WARNING, "Invalid ICC profile type %d\n", type); + break; + } gb_temp = s->gb; bytestream2_seek(&gb_temp, SEEK_SET, off);