ffmpeg | branch: master | Michael Niedermayer <mich...@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: 黄宁 <tsukimura...@163.com>
Reviewed-by: Nick Renieris <velocit...@gmail.com>
Signed-off-by: Michael Niedermayer <mich...@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) {

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to