diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-06-04 22:59:34 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-04 23:10:56 +0200 |
commit | c2657633187e325a439e3297fd9ccd0522ab2e39 (patch) | |
tree | 305f1f7b9b0eece33a89ec5a9e8f17123ae6f766 /libavcodec/alsdec.c | |
parent | 6b6ae7c3ead5dee786a4aea929820076a7c82da4 (diff) | |
download | ffmpeg-c2657633187e325a439e3297fd9ccd0522ab2e39.tar.gz |
avcodec/alsdec: Check for overread
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/alsdec.c')
-rw-r--r-- | libavcodec/alsdec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 75be55cc1e..b7d147d681 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; } |