diff options
author | jackpoz <giacomopoz@gmail.com> | 2014-02-08 21:57:28 +0100 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2014-02-08 21:59:35 +0100 |
commit | dbed818f6fe435a02d10f110e2c0883a53330230 (patch) | |
tree | 58852a7eac3a7befba9f1bf51bace9b159acabe9 /src/server/game/Scripting/ScriptLoader.cpp | |
parent | aaa4b3a1240b7b25a4050a7c6d3dc5184f3e581d (diff) |
Core/SAI: Fix crash
Disable script type SMART_SCRIPT_TYPE_TIMED_ACTIONLIST actions if they are trying to overwrite the timed action list while iterating it.
This was invalidating the iterator and deleting any smart action stored in it, including the current executed one.
Valgrind log:
Invalid read of size 1
at SmartScript::OnUpdate(unsigned int) (SmartScript.cpp:3258)
by SmartAI::UpdateAI(unsigned int) (SmartAI.cpp:331)
by Creature::Update(unsigned int) (Creature.cpp:544)
Address 0x1807d9b2 is 10 bytes after a block of size 40 alloc'd
at operator new(unsigned long) (vg_replace_malloc.c:319)
...
by SmartAIMgr::LoadSmartAIFromDB() (SmartScriptMgr.cpp:231)
by World::SetInitialWorldSettings() (World.cpp:1724)
by Master::Run() (Master.cpp:169)
by main (Main.cpp:142)
Diffstat (limited to 'src/server/game/Scripting/ScriptLoader.cpp')
0 files changed, 0 insertions, 0 deletions