mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-13 18:40:03 +01:00
avcodec/alsdec: Check for overread
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c265763318)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -1468,6 +1468,11 @@ static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame)
|
|||||||
|
|
||||||
// TODO: read_diff_float_data
|
// 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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user