Mercurial > libavcodec.hg
changeset 9105:9ae9d486669a libavcodec
flacdec: Return error when blocksize code of 0 is found. It is a
reserved value per the FLAC format documentation.
author | jbr |
---|---|
date | Tue, 03 Mar 2009 05:22:44 +0000 |
parents | fd301ba2cbba |
children | 4984f305def8 |
files | flacdec.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/flacdec.c Tue Mar 03 05:18:39 2009 +0000 +++ b/flacdec.c Tue Mar 03 05:22:44 2009 +0000 @@ -527,9 +527,10 @@ 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;