mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-29 14:30:27 +00:00
vmdaudio: validate block type
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
This commit is contained in:
parent
dd1af5136f
commit
22f893e1c9
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user