avcodec/tiff: Check for planar DNG images

The DNG code hardcodes plane 0 at some places, so its better to disallow cases
that have more planes.

Fixes: eg_crash
Found-by: 黄宁 <tsukimurarin@163.com>
Reviewed-by: Nick Renieris <velocityra@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/336/head
Michael Niedermayer 5 years ago
parent f1ab6962ca
commit 61e6eddc57
  1. 2
      libavcodec/tiff.c

@ -1874,6 +1874,8 @@ again:
bps = s->bpp / s->bppcount;
if (bps < 8 || bps > 32)
return AVERROR_INVALIDDATA;
if (s->planar)
return AVERROR_PATCHWELCOME;
}
if (!s->is_tiled && !s->strippos && !s->stripoff) {

Loading…
Cancel
Save