[FFmpeg-cvslog] avcodec/mpeg12dec: check for overread in mpeg1_fast_decode_block_inter()
Michael Niedermayer
git at videolan.org
Fri Jan 24 18:38:53 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jan 24 16:46:43 2014 +0100| [0a59055167eea3087a36d9091501d3bb52ed8ebe] | committer: Michael Niedermayer
avcodec/mpeg12dec: check for overread in mpeg1_fast_decode_block_inter()
No speedloss meassured
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0a59055167eea3087a36d9091501d3bb52ed8ebe
---
libavcodec/mpeg12dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 91346bf..a4ff5d6 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);
}
More information about the ffmpeg-cvslog
mailing list