changeset 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
files mlpdec.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mlpdec.c	Fri Mar 27 23:48:08 2009 +0000
+++ b/mlpdec.c	Fri Mar 27 23:55:38 2009 +0000
@@ -609,8 +609,8 @@
     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;
             }