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-05 00:10:56 +0300
commitc2657633187e325a439e3297fd9ccd0522ab2e39 (patch)
tree305f1f7b9b0eece33a89ec5a9e8f17123ae6f766 /libavcodec/alsdec.c
parent6b6ae7c3ead5dee786a4aea929820076a7c82da4 (diff)
avcodec/alsdec: Check for overread
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/alsdec.c')
-rw-r--r--libavcodec/alsdec.c5
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;
}