Commit fcf97216 authored by Karl Wette's avatar Karl Wette

Merge branch 'SemiCoherentUtils-fread-fix' into 'master'

SemiCoherentUtils: check return value of fread()

Closes #138

See merge request !621
parents 7b984259 67dc279a
Pipeline #44530 passed with stages
in 147 minutes and 6 seconds
......@@ -1458,7 +1458,10 @@ int XLALBinaryToSFTVector( SFTVector **SFTvect, /**< [out] copied SFT (needs
/* read in the data to the timeseries */
REAL8 sum = 0;
for ( i = 0; i < Nfile; i++ ) {
fread( &dummy, sizeof( REAL4 ), 1, binfp );
if ( fread( &dummy, sizeof( REAL4 ), 1, binfp ) != 1 ) {
LogPrintf( LOG_CRITICAL, "%s: Error, unable to read timeseries data\n", __func__ );
return XLAL_FAILURE;
}
Tseries->data->data[i] = dummy;
sum += Tseries->data->data[i];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment