Consider a build option to use sprintf_s (C standard, but optional) instead of snprintf/safe_snprintf for build environments that support it.