google/REAPER

Segmentation fault (core dumped) when audio file is all zeros

kkawabat opened this issue · 2 comments

when the file does not have any signal (all zeros) the number of resid_peaks is 0 which causes an index out of bound error in EpochTracker::BacktrackAndSaveOutput() line 1029

adding the below code before the for loop prevented crash

  if (resid_peaks_.size() == 0) {
    fprintf(stderr, "No residule peaks found\n");
    return false;
  }