From: Steinar H. Gunderson Date: Fri, 28 Apr 2006 11:58:21 +0000 (+0000) Subject: Fix a possible segfault. X-Git-Url: https://git.sesse.net/?p=pitch;a=commitdiff_plain;h=2bb871a3a6ca4b73e8583de4de97f7b55dd1614c;hp=f4906bf100acb8c5875196b7c2306effdd6a091d Fix a possible segfault. --- diff --git a/pitch.cpp b/pitch.cpp index 97238f5..c8246dc 100644 --- a/pitch.cpp +++ b/pitch.cpp @@ -46,7 +46,7 @@ int main() in = reinterpret_cast (fftw_malloc(sizeof(double) * FFT_LENGTH / PAD_FACTOR)); in_windowed = reinterpret_cast (fftw_malloc(sizeof(double) * FFT_LENGTH)); out = reinterpret_cast *> (fftw_malloc(sizeof(std::complex) * (FFT_LENGTH / 2 + 1))); - bins = reinterpret_cast (fftw_malloc(sizeof(double) * FFT_LENGTH / 2 + 1)); + bins = reinterpret_cast (fftw_malloc(sizeof(double) * (FFT_LENGTH / 2 + 1))); memset(in, 0, sizeof(double) * FFT_LENGTH / PAD_FACTOR);