mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-20 22:08:22 +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:
@@ -3812,7 +3812,9 @@ void Mob::BuffProcess()
|
|||||||
{
|
{
|
||||||
if (IsValidOrSuppressedSpell(buffs[buffs_i].spellid))
|
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 the Mob died during DoBuffTic, then the buff we are currently processing will have been removed
|
||||||
if(!IsValidOrSuppressedSpell(buffs[buffs_i].spellid)) {
|
if(!IsValidOrSuppressedSpell(buffs[buffs_i].spellid)) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user