Skip to content

Add checks for snprintf string truncation

John Douglas Veitch requested to merge (removed):ubuntu-compilation into master

GCC 7 on ubuntu 17.10 refuses to compile LALSuite, complaining with messages like

ring.c:516:11: error: ‘_SPEC’ directive output may be truncated writing 5 bytes into a region of size between 1 and 64 [-Werror=format-truncation=]

This patch fixes all such messages in lalapps/ring/ by checking the return value of snprintf and throwing an error if the string was truncated.

Merge request reports

Loading