diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index c8e24e33cc..680269b096 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1033,6 +1033,7 @@ static int tiff_decode_tag(TiffContext *s, AVFrame *frame) s->subsampling[i] = ff_tget(&s->gb, type, s->le); if (s->subsampling[i] <= 0) { av_log(s->avctx, AV_LOG_ERROR, "subsampling %d is invalid\n", s->subsampling[i]); + s->subsampling[i] = 1; return AVERROR_INVALIDDATA; } }