[FFmpeg-cvslog] fraps: check for overread.
Michael Niedermayer
git at videolan.org
Sun Nov 27 00:39:11 CET 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 9 19:40:59 2011 +0100| [5ace144fe0b7519c389d3ddcdcf7082b4e89b0df] | committer: Anton Khirnov
fraps: check for overread.
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ace144fe0b7519c389d3ddcdcf7082b4e89b0df
---
libavcodec/fraps.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index ed33c3e..1444eda 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -111,6 +111,10 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w,
*/
if(j) dst[i] += dst[i - stride];
else if(Uoff) dst[i] += 0x80;
+ if (get_bits_left(&gb) < 0) {
+ free_vlc(&vlc);
+ return AVERROR_INVALIDDATA;
+ }
}
dst += stride;
}
More information about the ffmpeg-cvslog
mailing list