Fix use of uninitialized value in noise_util.c BUG=aomedia:1963 Change-Id: If08601d556fbefbb680a2b9ecfd48115d32bef60
diff --git a/aom_dsp/noise_util.c b/aom_dsp/noise_util.c index db4ca07..87e8e9f 100644 --- a/aom_dsp/noise_util.c +++ b/aom_dsp/noise_util.c
@@ -75,6 +75,12 @@ aom_noise_tx_free(noise_tx); return NULL; } + // Clear the buffers up front. Some outputs of the forward transform are + // real only (the imaginary component will never be touched) + memset(noise_tx->tx_block, 0, + 2 * sizeof(*noise_tx->tx_block) * block_size * block_size); + memset(noise_tx->temp, 0, + 2 * sizeof(*noise_tx->temp) * block_size * block_size); return noise_tx; }