mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 21:56:22 +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:
@@ -136,7 +136,7 @@ std::string _SpellScript::EffectNameCheck::ToString()
|
||||
return "SPELL_EFFECT_ANY";
|
||||
default:
|
||||
char num[10];
|
||||
sprintf (num, "%u", effName);
|
||||
snprintf(num, sizeof(num), "%u", effName);
|
||||
return num;
|
||||
}
|
||||
}
|
||||
@@ -158,7 +158,7 @@ std::string _SpellScript::EffectAuraNameCheck::ToString()
|
||||
return "SPELL_AURA_ANY";
|
||||
default:
|
||||
char num[10];
|
||||
sprintf (num, "%u", effAurName);
|
||||
snprintf(num, sizeof(num), "%u", effAurName);
|
||||
return num;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user