I maintain a fairly large piece of legacy code that still uses strncpy a lot. I have now started the process of replacing the usage of strncpy with
strncpy
strcpy_s() will fill in the buffer with 'FE' in debug mode only.
strcpy_s()
'FE'
You can turn this off explicitly by calling _CrtSetDebugFillThreshold(0)