fix (core): macos12 depreciation workflow error / security CWE-120 (#14746)

* fix (core): macos12 depreciation workflow error

Fix workflow error message:
azerothcore-wotlk/src/common/Utilities/Util.cpp:558:9: fatal error: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
        sprintf(buffer, "%02X", bytes[i]);

* Update BattlegroundAV.cpp

* more macos12 fixit

* Update spell_generic.cpp
This commit is contained in:
M'Dic
2023-01-23 06:13:27 -05:00
committed by GitHub
parent 513dab0740
commit 437d93926f
10 changed files with 17 additions and 17 deletions

View File

@@ -438,7 +438,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
if (Creature* herald = me->FindNearestCreature(NPC_DARK_IRON_HERALD, 100.0f))
{
char amount[500];
sprintf(amount, "We did it boys! Now back to the Grim Guzzler and we'll drink to the %u that were injured!", guzzlerCounter);
snprintf(amount, sizeof(amount), "We did it boys! Now back to the Grim Guzzler and we'll drink to the %u that were injured!", guzzlerCounter);
herald->Yell(amount, LANG_UNIVERSAL);
}
@@ -451,7 +451,7 @@ struct npc_dark_iron_attack_generator : public ScriptedAI
if (Creature* herald = me->FindNearestCreature(NPC_DARK_IRON_HERALD, 100.0f))
{
char amount[500];
sprintf(amount, "RETREAT!! We've already lost %u and we can't afford to lose any more!!", guzzlerCounter);
snprintf(amount, sizeof(amount), "RETREAT!! We've already lost %u and we can't afford to lose any more!!", guzzlerCounter);
herald->Yell(amount, LANG_UNIVERSAL);
}