mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-10 10:18:21 +00:00
23d71340c9
unsure how to reproduce the actual bug, however we can see that with the following crash dump ``` Entity::GetComponent(eReplicaComponentType) const(+0x4) [0x56095665e634] BossSpiderQueenEnemyServer::OnDie(Entity*, Entity*)(+0x28d) [0x560956795d0d] Entity::Kill(Entity*)(+0xf8) [0x5609566637a8] ZoneAgProperty::BaseTimerDone(Entity*, std::string const&)(+0x89b) [0x56095683736b] Entity::Update(float)(+0x2b6) [0x560956662676] EntityManager::UpdateEntities(float)(+0x2e) [0x56095667305e] ``` that the actual crash issue starts at ``` Entity::Kill(Entity*)(+0xf8) [0x5609566637a8] ZoneAgProperty::BaseTimerDone(Entity*, std::string const&) ``` BaseTimerDone calls Kill, and there is only 1 call to Kill in the function which calls Kill no arguments, meaning the killer is a nullptr. This propogates its way to the BossSpiderQueenEnemyServer::OnDie wherein we blindly check the killer pointer without verifying that the pointer is actually valid. This patch simply checks that killer is valid before access to address the hole. |
||
---|---|---|
.. | ||
BossSpiderQueenEnemyServer.cpp | ||
BossSpiderQueenEnemyServer.h | ||
CMakeLists.txt |