changeset 11963:74c0478534cf libavcodec

alsdec: convert VLAs to fixed size The maximum value of sub_blocks is 8, a safe size to always allocate on stack.
author mru
date Sat, 26 Jun 2010 14:34:18 +0000
parents 150c7c236e78
children f092b80c0da2
files alsdec.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/alsdec.c	Sat Jun 26 14:34:15 2010 +0000
+++ b/alsdec.c	Sat Jun 26 14:34:18 2010 +0000
@@ -734,8 +734,8 @@
 
     // read all residuals
     if (sconf->bgmc) {
-        unsigned int delta[sub_blocks];
-        unsigned int k    [sub_blocks];
+        unsigned int delta[8];
+        unsigned int k    [8];
         unsigned int b = av_clip((av_ceil_log2(bd->block_length) - 3) >> 1, 0, 5);
         unsigned int i = start;