gcc 8 -Wstringop-overflow is uhappy when the specified bounds depend on the length of the source and is not smart enough to see the check we do. Besides we don't want the padding effect of strncpy() here.