X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Falsdec.c;h=b7d147d681f2489bfdeffd87067f6363fae65b19;hb=0916938a8dfac27096ed9f6873d32e24fa5f87c9;hp=75be55cc1ed82f4dd66b37f992a7636da6f894f3;hpb=f24b7d7616533cd00475d7bf93f3a33ff5ac40dc;p=ffmpeg diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 75be55cc1ed..b7d147d681f 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; }