[FFmpeg-cvslog] avcodec/alsdec: Check for overread
Michael Niedermayer
git at videolan.org
Tue Jul 28 03:21:24 CEST 2015
ffmpeg | branch: release/2.5 | Michael Niedermayer <michaelni at gmx.at> | Thu Jun 4 22:59:34 2015 +0200| [5ebae729b9a9cbeb553056eca25a2caedbe03c5d] | committer: Michael Niedermayer
avcodec/alsdec: Check for overread
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit c2657633187e325a439e3297fd9ccd0522ab2e39)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ebae729b9a9cbeb553056eca25a2caedbe03c5d
---
libavcodec/alsdec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index a55354b..708c714 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1493,6 +1493,11 @@ static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame)
// TODO: read_diff_float_data
+ if (get_bits_left(gb) < 0) {
+ av_log(ctx->avctx, AV_LOG_ERROR, "Overread %d\n", -get_bits_left(gb));
+ return AVERROR_INVALIDDATA;
+ }
+
return 0;
}
More information about the ffmpeg-cvslog
mailing list