Commit 9fcde35c authored by jbr's avatar jbr

flacdec: Return error when blocksize code of 0 is found. It is a

reserved value per the FLAC format documentation.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17747 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 17362996
......@@ -527,9 +527,10 @@ static int decode_frame(FLACContext *s, int alloc_data_size)
return -1;
}
if (blocksize_code == 0)
blocksize = s->min_blocksize;
else if (blocksize_code == 6)
if (blocksize_code == 0) {
av_log(s->avctx, AV_LOG_ERROR, "reserved blocksize code: 0\n");
return -1;
} else if (blocksize_code == 6)
blocksize = get_bits(&s->gb, 8)+1;
else if (blocksize_code == 7)
blocksize = get_bits(&s->gb, 16)+1;
......
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