Commit 3c41434a authored by Kipp Cannon's avatar Kipp Cannon

Merge branch 'fixcohptf' into 'master'

coh_PTF_output.c injsgnl.c:  make compilable

See merge request lscsoft/lalsuite!618
parents 5fa2285b 6be7d287
......@@ -283,7 +283,7 @@ SearchSummaryTable *coh_PTF_create_search_summary( struct coh_PTF_params *params
/* setup search summary table */
searchSummary = LALCalloc( 1, sizeof( *searchSummary ) );
strncpy( searchSummary->comment, params->programName, LIGOMETA_COMMENT_MAX );
strncpy( searchSummary->comment, params->programName, LIGOMETA_COMMENT_MAX-1 );
searchSummary->nnodes = 1;
/* compute the start and end times of data analyzed */
......
......@@ -66,7 +66,7 @@ int ring_inject_signal(
INT4 stopSec;
int strainData;
char ifoName[3];
char name[LALNameLength+4];
char name[LALNameLength];
REAL8 sampleRate;
INT4 calType=0;
......@@ -78,7 +78,7 @@ int ring_inject_signal(
/* copy injectFile to injFile (to get rid of const qual) */
strncpy( injFile, injectFile, sizeof( injFile ) - 1 );
snprintf( name, sizeof( name ), "%s_INJ", series->name );
if(snprintf( name, sizeof( name ), "%s_INJ", series->name ) >= (int) sizeof( name )) abort();
strncpy( ifoName, series->name, 2 );
ifoName[2] = 0;
......@@ -166,7 +166,7 @@ int ring_inject_signal(
}
/* correct the name */
strncpy( series->name, name, sizeof( series->name ) - 1 );
strncpy( series->name, name, sizeof( series->name ) );
/* reset units if necessary */
if ( strainData )
......
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