mirror of https://git.ffmpeg.org/ffmpeg.git
adpcmdec: Fix OOM/infloop
Found-by: ami_stuff Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
34b6f1efa2
commit
807fa714f0
|
@ -1355,6 +1355,11 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (avpkt->size && bytestream2_tell(&gb) == 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Nothing consumed\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
*got_frame_ptr = 1;
|
||||
*(AVFrame *)data = c->frame;
|
||||
|
||||
|
|
Loading…
Reference in New Issue