OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86a2602
)
jpeg2000: Check that nreslevels2decode has been initialized before use
author
Michael Niedermayer
<michaelni@gmx.at>
Mon, 1 Jul 2013 08:01:11 +0000
(10:01 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Tue, 2 Jul 2013 18:05:45 +0000
(20:05 +0200)
Avoid buffer overread.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/jpeg2000.c
patch
|
blob
|
history
diff --git
a/libavcodec/jpeg2000.c
b/libavcodec/jpeg2000.c
index
705399a
..
5889f80
100644
(file)
--- a/
libavcodec/jpeg2000.c
+++ b/
libavcodec/jpeg2000.c
@@
-206,6
+206,11
@@
int ff_jpeg2000_init_component(Jpeg2000Component *comp,
int reslevelno, bandno, gbandno = 0, ret, i, j;
uint32_t csize = 1;
+ if (!codsty->nreslevels2decode) {
+ av_log(avctx, AV_LOG_ERROR, "nreslevels2decode uninitialized\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if (ret = ff_jpeg2000_dwt_init(&comp->dwt, comp->coord,
codsty->nreslevels2decode - 1,
codsty->transform))