mborgerding / kissfft

a Fast Fourier Transform (FFT) library that tries to Keep it Simple, Stupid
Other
1.39k stars 278 forks source link

MSVC static code analysis #32

Closed bjaraujo closed 4 years ago

bjaraujo commented 4 years ago

MSVC 2019 warning about line 210.

kiss_fft.c(210): warning C6011: Dereferencing NULL pointer 'scratch'. kiss_fft.c(222): warning C6385: Reading invalid data from 'scratch': the readable size is 'sizeof(kiss_fft_cpx)*p' bytes, but '16' bytes may be read.

Are these false positives?

mborgerding commented 4 years ago

The first one may be complaining that the alloc result is not checked for NULL. The second one looks like a false positive to me since q is in [1,p)

Is KISS_FFT_USE_ALLOCA defined? (see _kiss_fft_guts.h)