diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-12-18 11:18:22 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2015-12-18 11:18:22 +0100 |
commit | 898676c3389cac1b634b7baf1bb2f5ce1c2f662b (patch) | |
tree | 40ae9c4227d6ce4989de6b43f2bcbed018e89678 /toolame.c | |
parent | 795eb9c2f0e7725460af7c69f41da5aa1f92ca17 (diff) | |
download | toolame-dab-898676c3389cac1b634b7baf1bb2f5ce1c2f662b.tar.gz toolame-dab-898676c3389cac1b634b7baf1bb2f5ce1c2f662b.tar.bz2 toolame-dab-898676c3389cac1b634b7baf1bb2f5ce1c2f662b.zip |
Fix out-of-bounds memory access for peak calculation
Diffstat (limited to 'toolame.c')
-rw-r--r-- | toolame.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -236,10 +236,10 @@ int main (int argc, char **argv) } unsigned long j; - for (j = 0; j < samps_read; j++) { + for (j = 0; j < 1152; j++) { peak_left = MAX(peak_left, buffer[0][j]); } - for (j = 0; j < samps_read; j++) { + for (j = 0; j < 1152; j++) { peak_right = MAX(peak_right, buffer[1][j]); } |