diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 826c588676..6252dbcb6a 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -1291,7 +1291,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, } break; case CODEC_ID_ADPCM_EA: - if (buf_size < 4 || AV_RL32(src) >= ((buf_size - 12) * 2)) { + if (buf_size < 12 || AV_RL32(src) > (buf_size - 12)/30*28) { src += buf_size; break; }