Changeset 8fe9c10 for src/spectral


Ignore:
Timestamp:
Oct 8, 2009, 2:02:11 AM (15 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
cc9d0cc
Parents:
1594d49
Message:

src/spectral/filterbank.c: make sure we don't read outside of boundaries

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/filterbank.c

    r1594d49 r8fe9c10  
    6363  uint_t max_channels = MIN (in->channels, out->channels);
    6464  uint_t max_filters = MIN (f->n_filters, out->length);
     65  uint_t max_length = MIN (in->length, f->filters->length);
    6566
    6667  /* reset all values in output vector */
     
    7475
    7576      /* for each sample */
    76       for (j = 0; j < in->length; j++) {
     77      for (j = 0; j < max_length; j++) {
    7778        out->data[i][fn] += in->norm[i][j] * f->filters->data[fn][j];
    7879      }
Note: See TracChangeset for help on using the changeset viewer.