shithub: aubio

Download patch

ref: 0d475dca70540ca905ad95c255ef330e8d24ae17
parent: ce24ae0f904c694173c92e9fb0594682df2277ec
author: Paul Brossier <piem@piem.org>
date: Mon Jul 7 14:25:09 EDT 2014

src/io/source_sndfile.c: fix crash, zero-pad output vector when upsampling

--- a/src/io/source_sndfile.c
+++ b/src/io/source_sndfile.c
@@ -184,7 +184,7 @@
 
   if (*read < s->hop_size) {
     for (j = *read; j < s->hop_size; j++) {
-      data[j] = 0;
+      read_data->data[j] = 0;
     }
   }
 
@@ -247,7 +247,7 @@
   if (*read < s->hop_size) {
     for (i = 0; i < read_data->height; i++) {
       for (j = *read; j < s->hop_size; j++) {
-        data[i][j] = 0.;
+        read_data->data[i][j] = 0.;
       }
     }
   }
--