Since Ubuntu 8.10 -D_FORTIFY_SOURCE=2 is enabled when compiling
with -O2 or higher. OpenCPN
"release" builds use -O3 and are
thus "fortified" . The current
(git repo) version causes a runtime
exception to be thrown around the potentially unsafe use of
strcpy in navutil.cpp:3041:
strcpy ( pOLE->OBJLName, sObj.mb_str() );
No compile time warning is given. Other occurrences of strcpy may
cause the same issue. I've had to define -U_FORTIFY_SOURCE as
CMAKE_CXX_FLAGS and CMAKE_C_FLAGS to disable the checks.
How to reproduce: Enable CM93 charts
on release version built on
a recent Ubuntu (and likely other Linux
variants). Restart application.
I am unfortunately not good enough a coder for replacing strcpy with
one of its safer alternatives.
 Jakub Jelinek - [PATCH] Object size checking to prevent (some) buffer overflows