Commit 22f893e1 authored by Justin Ruggles's avatar Justin Ruggles Committed by Ronald S. Bultje

vmdaudio: validate block type

Signed-off-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
parent dd1af513
......@@ -518,6 +518,10 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx,
return buf_size;
block_type = buf[6];
if (block_type < BLOCK_TYPE_AUDIO || block_type > BLOCK_TYPE_SILENCE) {
av_log(avctx, AV_LOG_ERROR, "unknown block type: %d\n", block_type);
return AVERROR(EINVAL);
}
if (block_type == BLOCK_TYPE_AUDIO) {
/* the chunk contains audio */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment