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:
76b9a09
)
4xm: check if there are bits left in decode_i_block()
author
Michael Niedermayer
<michaelni@gmx.at>
Wed, 14 Dec 2011 21:20:39 +0000
(22:20 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Wed, 14 Dec 2011 21:24:44 +0000
(22:24 +0100)
Fixed Ticket753
Bug Found by: Diana Elena Muscalu
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/4xm.c
patch
|
blob
|
history
diff --git
a/libavcodec/4xm.c
b/libavcodec/4xm.c
index
9350f06
..
f854f1c
100644
(file)
--- a/
libavcodec/4xm.c
+++ b/
libavcodec/4xm.c
@@
-459,6
+459,11
@@
static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length){
static int decode_i_block(FourXContext *f, DCTELEM *block){
int code, i, j, level, val;
+ if(get_bits_left(&f->gb) < 2){
+ av_log(f->avctx, AV_LOG_ERROR, "%d bits left before decode_i_block()\n", get_bits_left(&f->gb));
+ return -1;
+ }
+
/* DC coef */
val = get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3);
if (val>>4){