diff --git a/inputsource.cpp b/inputsource.cpp index 6cc6049..3bf22eb 100644 --- a/inputsource.cpp +++ b/inputsource.cpp @@ -187,7 +187,7 @@ std::unique_ptr[]> InputSource::getSamples(off_t start, off_ if(start < 0 || length < 0) return nullptr; - if (start + length >= sampleCount) + if (start + length > sampleCount) return nullptr; std::unique_ptr[]> dest(new std::complex[length]);