[FFmpeg-cvslog] avcodec/tiff: Check for planar DNG images
Michael Niedermayer
git at videolan.org
Thu Apr 30 02:06:38 EEST 2020
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Feb 15 17:10:47 2020 +0100| [61e6eddc5735c0b981d868a17c0fb8fe9b2b8a88] | committer: Michael Niedermayer
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 at 163.com>
Reviewed-by: Nick Renieris <velocityra at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=61e6eddc5735c0b981d868a17c0fb8fe9b2b8a88
---
libavcodec/tiff.c | 2 ++
1 file changed, 2 insertions(+)
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) {
More information about the ffmpeg-cvslog
mailing list