lalsuite uncompilable on up-to-date gcc
lalinference build fails due to numerous buffer overrun errors that current versions of gcc detect. The errors are shown below. lalinference was buildable sometime in the last few days, but was found to be broken this evening (2018-07-29 JST). I don't know what commit broke it or when.
LALInference.c: In function ‘LALInferencePrintNVariableItem’:
LALInference.c:729:9: error: ‘strncat’ output may be truncated copying 30 bytes from a string of length 30 [-Werror=stringop-truncation]
strncat(arrstr,this,30);
^~~~~~~~~~~~~~~~~~~~~~~
LALInference.c:749:9: error: ‘strncat’ output may be truncated copying 30 bytes from a string of length 30 [-Werror=stringop-truncation]
strncat(arrstr,this,30);
^~~~~~~~~~~~~~~~~~~~~~~
LALInference.c:775:9: error: ‘strncat’ output may be truncated copying 30 bytes from a string of length 30 [-Werror=stringop-truncation]
strncat(arrstr,this,30);
^~~~~~~~~~~~~~~~~~~~~~~
config.status: creating src/LALInferenceVCSInfo.c
CC liblalinference_la-LALInferenceVCSInfo.lo
LALInference.c: In function ‘LALInferenceDumpWaveforms’:
LALInference.c:3417:29: error: ‘_time.txt’ directive writing 9 bytes into a region of size between 1 and 1024 [-Werror=format-overflow=]
sprintf(filename,"%s_time.txt",basename);
^~~~~~~~~
LALInference.c:3417:9: note: ‘sprintf’ output between 10 and 1033 bytes into a destination of size 1024
sprintf(filename,"%s_time.txt",basename);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LALInference.c:3426:29: error: ‘_freq.txt’ directive writing 9 bytes into a region of size between 1 and 1024 [-Werror=format-overflow=]
sprintf(filename,"%s_freq.txt",basename);
^~~~~~~~~
LALInference.c:3426:9: note: ‘sprintf’ output between 10 and 1033 bytes into a destination of size 1024
sprintf(filename,"%s_freq.txt",basename);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Edited by Adam Mercer