daniel-koehn / DENISE-Black-Edition

2D time-domain isotropic (visco)elastic FD modeling and full waveform inversion (FWI) code for P/SV-waves
GNU General Public License v2.0
121 stars 66 forks source link

FP used uninitialized when READREC==2 #13

Closed ar4 closed 5 years ago

ar4 commented 5 years ago

FP is declared at: https://github.com/daniel-koehn/DENISE-Black-Edition/blob/74b57f25bdb7ff667ab6a37fa430acafd5745ebe/src/PSV/obj_psv.c#L24

and then used uninitialized when READREC==2 at: https://github.com/daniel-koehn/DENISE-Black-Edition/blob/74b57f25bdb7ff667ab6a37fa430acafd5745ebe/src/PSV/obj_psv.c#L57

daniel-koehn commented 5 years ago

Thanks for the bug report. I set the file pointer FP to stdout in the obj_xx.c codes of the DENISE SH, AC and PSV modules.