Module: libav
Branch: master
Commit: 18a245a2aea31b92bc435f2962a71e060d83b5f7

Author:    Martin Storsjö <mar...@martin.st>
Committer: Martin Storsjö <mar...@martin.st>
Date:      Mon Sep 16 16:17:05 2013 +0300

jpeg2000dec: Add more checks when parsing headers

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-sta...@libav.org
Signed-off-by: Martin Storsjö <mar...@martin.st>

---

 libavcodec/jpeg2000dec.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index 61befdf..18346f9 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -1284,6 +1284,10 @@ static int 
jpeg2000_read_main_headers(Jpeg2000DecoderContext *s)
                 av_log(s->avctx, AV_LOG_ERROR, "Missing SOT\n");
                 return AVERROR_INVALIDDATA;
             }
+            if (!s->tile) {
+                av_log(s->avctx, AV_LOG_ERROR, "Missing SIZ\n");
+                return AVERROR_INVALIDDATA;
+            }
 
             tile = s->tile + s->curtileno;
             tp = tile->tile_part + tile->tp_idx;

_______________________________________________
libav-commits mailing list
libav-commits@libav.org
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to