fixed array overrun bug spotted by Steve - thanks Steve
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 27 Jan 2017 20:56:12 +0000 (20:56 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 27 Jan 2017 20:56:12 +0000 (20:56 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@3000 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/src/phase.c

index 61efc95c48c89e7bf4ee7750055add444499cccc..f6e4f4be7f3f247307b0c55f3ff013cb7f0d9f5f 100644 (file)
@@ -244,8 +244,7 @@ void mag_to_phase(float phase[],             /* Nfft/2+1 output phase samples in
        account kiss fft lack of scaling on ifft */
 
     Sdb[0].real = Gdbfk[0];
-    Sdb[Ns].real = Gdbfk[Ns];
-    Sdb[0].imag = Sdb[Ns].imag = 0.0;
+    Sdb[0].imag = 0.0;
     for(i=1; i<Ns; i++) {
         Sdb[i].real = Sdb[Nfft-i].real = Gdbfk[i];
         Sdb[i].imag = Sdb[Nfft-i].imag = 0.0;