1
0
mirror of https://github.com/saitohirga/WSJT-X.git synced 2025-03-25 05:29:16 -04:00

Protect against out-of-bounds array index. Thanks N2BP.

This commit is contained in:
Steven Franke 2023-04-26 13:35:18 -05:00
parent c348791b28
commit cc22bd2819

View File

@ -1165,7 +1165,7 @@ int main(int argc, char *argv[])
for (k=0; k<162; k++) { //Sum over symbols
ifd=ifr+((float)k-81.0)/81.0*( (float)idrift )/(2.0*df);
kindex=k0+2*k;
if( kindex < nffts ) {
if( kindex >= 0 && kindex < nffts ) {
p0=ps[ifd-3][kindex];
p1=ps[ifd-1][kindex];
p2=ps[ifd+1][kindex];