mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
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:
@@ -189,7 +189,7 @@ public:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 55.0f, true) )
|
||||
{
|
||||
char buffer[100];
|
||||
sprintf(buffer, "Eadric the Pure targets %s with the Hammer of the Righteous!", target->GetName().c_str());
|
||||
snprintf(buffer, sizeof(buffer), "Eadric the Pure targets %s with the Hammer of the Righteous!", target->GetName().c_str());
|
||||
me->TextEmote(buffer, nullptr, true);
|
||||
Talk(TEXT_EADRIC_HAMMER);
|
||||
me->CastSpell(target, SPELL_HAMMER_JUSTICE, true);
|
||||
|
||||
@@ -654,7 +654,7 @@ public:
|
||||
case SPELL_TRAMPLE_STUN:
|
||||
{
|
||||
char buffer[50];
|
||||
sprintf(buffer, "%s is trampled!", me->GetName().c_str());
|
||||
snprintf(buffer, sizeof(buffer), "%s is trampled!", me->GetName().c_str());
|
||||
me->TextEmote(buffer);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user