Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-24 19:46:43 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-01-24 21:09:16 +0400
commit0a59055167eea3087a36d9091501d3bb52ed8ebe (patch)
tree5558f40804353101c4843384dda919e0a1ac2b42 /libavcodec/mpeg12dec.c
parent746350ea0f7bde1e9fd23270e104af8897197293 (diff)
avcodec/mpeg12dec: check for overread in mpeg1_fast_decode_block_inter()
No speedloss meassured Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg12dec.c')
-rw-r--r--libavcodec/mpeg12dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 91346bf52b..a4ff5d6925 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -335,7 +335,7 @@ static inline int mpeg1_fast_decode_block_inter(MpegEncContext *s, int16_t *bloc
}
block[j] = level;
- if (((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
+ if (((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF || i >= 64)
break;
UPDATE_CACHE(re, &s->gb);
}