projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c38854c
)
jpeg2000dec: Add more checks when parsing headers
author
Martin Storsjö
<martin@martin.st>
Mon, 16 Sep 2013 13:17:05 +0000
(16:17 +0300)
committer
Martin Storsjö
<martin@martin.st>
Tue, 17 Sep 2013 12:57:27 +0000
(15:57 +0300)
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
libavcodec/jpeg2000dec.c
patch
|
blob
|
history
diff --git
a/libavcodec/jpeg2000dec.c
b/libavcodec/jpeg2000dec.c
index
61befdf
..
18346f9
100644
(file)
--- 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;