git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8453095
)
avcodec/jpeg2000dwt: Check ndeclevels before calling dwt_decode*()
author
Michael Niedermayer
<michael@niedermayer.cc>
Fri, 27 Nov 2015 19:52:39 +0000
(20:52 +0100)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Fri, 27 Nov 2015 19:59:26 +0000
(20:59 +0100)
Fixes out of array access
Fixes:
01859c9a9ac6cd60a008274123275574
/asan_heap-oob_1dff571_8250_50d3d1611e294c3519fd1fa82198b69b.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/jpeg2000dwt.c
patch
|
blob
|
history
diff --git
a/libavcodec/jpeg2000dwt.c
b/libavcodec/jpeg2000dwt.c
index
2bf25a8
..
36e443d
100644
(file)
--- a/
libavcodec/jpeg2000dwt.c
+++ b/
libavcodec/jpeg2000dwt.c
@@
-595,6
+595,9
@@
int ff_dwt_encode(DWTContext *s, void *t)
int ff_dwt_decode(DWTContext *s, void *t)
{
+ if (s->ndeclevels == 0)
+ return 0;
+
switch (s->type) {
case FF_DWT97:
dwt_decode97_float(s, t);