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:
c9bfd6a
)
avcodec/faxcompr: Add missing runs check in decode_uncompressed()
author
Michael Niedermayer
<michael@niedermayer.cc>
Thu, 5 Nov 2015 20:35:23 +0000
(21:35 +0100)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Thu, 5 Nov 2015 20:36:14 +0000
(21:36 +0100)
Fixes out of array access
Fixes:
54e488b9da4abbceaf405d6492515697
/asan_heap-oob_32769b0_160_a8755eb08ee8f9579348501945a33955.TIF
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/faxcompr.c
patch
|
blob
|
history
diff --git
a/libavcodec/faxcompr.c
b/libavcodec/faxcompr.c
index
80df418
..
2a1d2bc
100644
(file)
--- a/
libavcodec/faxcompr.c
+++ b/
libavcodec/faxcompr.c
@@
-189,6
+189,10
@@
static int decode_uncompressed(AVCodecContext *avctx, GetBitContext *gb,
*mode = !*mode;
if (newmode != *mode) { //FIXME CHECK
*(*runs)++ = 0;
+ if (*runs >= runend) {
+ av_log(avctx, AV_LOG_ERROR, "uncompressed run overrun\n");
+ return AVERROR_INVALIDDATA;
+ }
*mode = newmode;
}
return 0;