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>2012-11-24 22:17:23 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-11-24 22:29:03 +0400
commit807fa714f05c584ac027c36841315cea98f329d3 (patch)
tree06fcca4e24edc12d9c430af7813a27a06ce4d3b7 /libavcodec/adpcm.c
parent34b6f1efa20694eab6268197e788a3c1a5cb2a3b (diff)
adpcmdec: Fix OOM/infloop
Found-by: ami_stuff Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r--libavcodec/adpcm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index d8bbdbb88e..3249522293 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -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;