shithub: dav1d

Download patch

ref: 068cddb9999f970b89fab8b6f6d5bbc390e5428f
parent: 3f13730e5594dd5ef5c3cfea8bd0e98d0cce098b
author: Nathan E. Egge <unlord@xiph.org>
date: Wed Sep 26 06:49:08 EDT 2018

Fix -Wvla warning in inv_txfm_add_c()

--- a/src/itx.c
+++ b/src/itx.c
@@ -49,7 +49,9 @@
 {
     int i, j;
     const ptrdiff_t sh = imin(h, 32), sw = imin(w, 32);
-    coef tmp[w * h], out[h], in_mem[w];
+    assert((h >= 4 || h <= 64) && (w >= 4 || w <= 64));
+    // Maximum value for h and w is 64
+    coef tmp[4096 /* w * h */], out[64 /* h */], in_mem[64 /* w */];
     const int is_rect2 = w * 2 == h || h * 2 == w;
 
     if (w != sw) memset(&in_mem[sw], 0, (w - sw) * sizeof(*in_mem));