Commit 59918397 authored by ramiro's avatar ramiro

mlpdec: Check for blocksize in proper range.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18211 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 1beb3c30
...@@ -609,8 +609,8 @@ static int read_decoding_params(MLPDecodeContext *m, GetBitContext *gbp, ...@@ -609,8 +609,8 @@ static int read_decoding_params(MLPDecodeContext *m, GetBitContext *gbp,
if (s->param_presence_flags & PARAM_BLOCKSIZE) if (s->param_presence_flags & PARAM_BLOCKSIZE)
if (get_bits1(gbp)) { if (get_bits1(gbp)) {
s->blocksize = get_bits(gbp, 9); s->blocksize = get_bits(gbp, 9);
if (s->blocksize > MAX_BLOCKSIZE) { if (s->blocksize < 8 || s->blocksize > m->access_unit_size) {
av_log(m->avctx, AV_LOG_ERROR, "block size too large\n"); av_log(m->avctx, AV_LOG_ERROR, "Invalid blocksize.");
s->blocksize = 0; s->blocksize = 0;
return -1; return -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