diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2020-02-15 19:10:47 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2020-04-30 00:42:37 +0300 |
commit | 61e6eddc5735c0b981d868a17c0fb8fe9b2b8a88 (patch) | |
tree | d5e18e08d547864671c8bb11b73c7723633f274d /libavcodec/tiff.c | |
parent | f1ab6962ca0374aca67994035292d52ef89741b7 (diff) |
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>
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r-- | libavcodec/tiff.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 39f5234d60..176bfc274b 100644 --- a/libavcodec/tiff.c +++ b/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) { |