mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-28 04:42:10 +01:00
Proper initialize POD struct members to 0 in SMART_ACTION_CREATE_TIMED_EVENT action type. Fix array overflows and access uninitialized values in SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST, SMART_ACTION_RANDOM_PHASE and SMART_ACTION_RANDOM_EMOTE . Valgrind log for SMART_ACTION_RANDOM_PHASE case: Conditional jump or move depends on uninitialised value(s) at : SmartScript::UpdateTimer(SmartScriptHolder&, unsigned int) (SmartScript.cpp:3086) by : SmartScript::OnUpdate(unsigned int) (SmartScript.cpp:3176) by : SmartAI::UpdateAI(unsigned int) (SmartAI.cpp:335) by : Creature::Update(unsigned int) (Creature.cpp:542) by : TempSummon::Update(unsigned int) (TemporarySummon.cpp:47) Uninitialised value was created by a stack allocation at : SmartScript::ProcessAction(SmartScriptHolder&, Unit*, unsigned int, unsigned int, bool, SpellInfo const*, GameObject*) (SmartScript.cpp:143)