]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
mlpdec: Check for blocksize in proper range.
authorramiro <ramiro@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 27 Mar 2009 23:55:38 +0000 (23:55 +0000)
committerramiro <ramiro@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Fri, 27 Mar 2009 23:55:38 +0000 (23:55 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18211 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/mlpdec.c

index 905fb0bdaeefaf167202d927cc71687be0faf859..d8fc87b87b7a56a61471eff44d3e2b971fc24aae 100644 (file)
@@ -609,8 +609,8 @@ static int read_decoding_params(MLPDecodeContext *m, GetBitContext *gbp,
     if (s->param_presence_flags & PARAM_BLOCKSIZE)
         if (get_bits1(gbp)) {
             s->blocksize = get_bits(gbp, 9);
-            if (s->blocksize > MAX_BLOCKSIZE) {
-                av_log(m->avctx, AV_LOG_ERROR, "block size too large\n");
+            if (s->blocksize < 8 || s->blocksize > m->access_unit_size) {
+                av_log(m->avctx, AV_LOG_ERROR, "Invalid blocksize.");
                 s->blocksize = 0;
                 return -1;
             }