summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-02-15 17:10:47 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-04-29 23:42:37 +0200
commit61e6eddc5735c0b981d868a17c0fb8fe9b2b8a88 (patch)
treed5e18e08d547864671c8bb11b73c7723633f274d /libavcodec
parentf1ab6962ca0374aca67994035292d52ef89741b7 (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')
-rw-r--r--libavcodec/tiff.c2
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) {