Mercurial > libavcodec.hg
diff mdct.c @ 11944:052b9c58ccc4 libavcodec
Remove VLA in ff_kbd_window_init, limit window size to 1024
author | mru |
---|---|
date | Thu, 24 Jun 2010 09:42:34 +0000 |
parents | 7dd2a45249a9 |
children |
line wrap: on
line diff
--- a/mdct.c Thu Jun 24 09:02:44 2010 +0000 +++ b/mdct.c Thu Jun 24 09:42:34 2010 +0000 @@ -36,9 +36,11 @@ { int i, j; double sum = 0.0, bessel, tmp; - double local_window[n]; + double local_window[FF_KBD_WINDOW_MAX]; double alpha2 = (alpha * M_PI / n) * (alpha * M_PI / n); + assert(n <= FF_KBD_WINDOW_MAX); + for (i = 0; i < n; i++) { tmp = i * (n - i) * alpha2; bessel = 1.0;