mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-19 16:52:25 +00:00
Skip DoBuffTic() for SPELL_SUPPRESSED buff slots
BuffProcess() calls DoBuffTic() on all valid-or-suppressed spells, but DoBuffTic() accesses spells[buff.spellid] which for SPELL_SUPPRESSED (0xFFFD) could read out-of-bounds memory. Add an explicit check to skip DoBuffTic() for suppressed slots since they should only have their timer decremented, not their effects ticked. Fixes #30
This commit is contained in:
parent
b3c40242f0
commit
0362cacf99
@ -3812,7 +3812,9 @@ void Mob::BuffProcess()
|
||||
{
|
||||
if (IsValidOrSuppressedSpell(buffs[buffs_i].spellid))
|
||||
{
|
||||
DoBuffTic(buffs[buffs_i], buffs_i, entity_list.GetMob(buffs[buffs_i].casterid));
|
||||
if (buffs[buffs_i].spellid != SPELL_SUPPRESSED) {
|
||||
DoBuffTic(buffs[buffs_i], buffs_i, entity_list.GetMob(buffs[buffs_i].casterid));
|
||||
}
|
||||
// If the Mob died during DoBuffTic, then the buff we are currently processing will have been removed
|
||||
if(!IsValidOrSuppressedSpell(buffs[buffs_i].spellid)) {
|
||||
continue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user