src/io/source_wavread.c: initialize buffer
authorPaul Brossier <piem@piem.org>
Wed, 5 Oct 2016 09:45:36 +0000 (11:45 +0200)
committerPaul Brossier <piem@piem.org>
Wed, 5 Oct 2016 09:45:36 +0000 (11:45 +0200)
src/io/source_wavread.c

index 6ff75e5..814b8e7 100644 (file)
@@ -76,7 +76,7 @@ static unsigned int read_little_endian (unsigned char *buf,
 aubio_source_wavread_t * new_aubio_source_wavread(const char_t * path, uint_t samplerate, uint_t hop_size) {
   aubio_source_wavread_t * s = AUBIO_NEW(aubio_source_wavread_t);
   size_t bytes_read = 0, bytes_junk = 0, bytes_expected = 44;
-  unsigned char buf[5];
+  unsigned char buf[5] = "\0";
   unsigned int format, channels, sr, byterate, blockalign, duration, bitspersample;//, data_size;
 
   if (path == NULL) {