Mercurial > libavcodec.hg
comparison mlpdec.c @ 9267:ca630efd0a96 libavcodec
mlpdec: Check for blocksize in proper range.
author | ramiro |
---|---|
date | Fri, 27 Mar 2009 23:55:38 +0000 |
parents | 129bdb41e856 |
children | 3020588d4312 |
comparison
equal
deleted
inserted
replaced
9266:129bdb41e856 | 9267:ca630efd0a96 |
---|---|
607 s->param_presence_flags = get_bits(gbp, 8); | 607 s->param_presence_flags = get_bits(gbp, 8); |
608 | 608 |
609 if (s->param_presence_flags & PARAM_BLOCKSIZE) | 609 if (s->param_presence_flags & PARAM_BLOCKSIZE) |
610 if (get_bits1(gbp)) { | 610 if (get_bits1(gbp)) { |
611 s->blocksize = get_bits(gbp, 9); | 611 s->blocksize = get_bits(gbp, 9); |
612 if (s->blocksize > MAX_BLOCKSIZE) { | 612 if (s->blocksize < 8 || s->blocksize > m->access_unit_size) { |
613 av_log(m->avctx, AV_LOG_ERROR, "block size too large\n"); | 613 av_log(m->avctx, AV_LOG_ERROR, "Invalid blocksize."); |
614 s->blocksize = 0; | 614 s->blocksize = 0; |
615 return -1; | 615 return -1; |
616 } | 616 } |
617 } | 617 } |
618 | 618 |