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>2015-06-04 23:59:34 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-06-10 03:13:12 +0300
commita3740b6a8644198d9c61f9080f4fa407d37531b8 (patch)
tree9fbc5baf3bd77e1d4683033302cb0b118ab13c45
parentff0e9060a53fc3c8fdcb40c4314e61b381a1b269 (diff)
avcodec/alsdec: Check for overread
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit c2657633187e325a439e3297fd9ccd0522ab2e39) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/alsdec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index bfadf70e0d..b1f6b3a435 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1468,6 +1468,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;
}