changeset 29297:dbc412fcde45

Initialize local variable, avoids a possible crash due to using an uninitialized variable as array index for mono files.
author reimar
date Mon, 01 Jun 2009 10:43:41 +0000
parents 8fa7fb4ae9ef
children fb99e3db8f8b
files libmpcodecs/ad_imaadpcm.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_imaadpcm.c	Mon Jun 01 09:43:32 2009 +0000
+++ b/libmpcodecs/ad_imaadpcm.c	Mon Jun 01 10:43:41 2009 +0000
@@ -163,8 +163,8 @@
 static int qt_ima_adpcm_decode_block(unsigned short *output,
   unsigned char *input, int channels, int block_size)
 {
-  int initial_predictor[2];
-  int initial_index[2];
+  int initial_predictor[2] = {0};
+  int initial_index[2] = {0};
   int i;
 
   if (channels != 1) channels = 2;