From 0362cacf991ebdd9b3f05b3ca799a3addf7826a8 Mon Sep 17 00:00:00 2001 From: Vayle Date: Sat, 31 Jan 2026 02:26:56 +0000 Subject: [PATCH] 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 --- zone/spell_effects.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index bd03298e1..48fd61234 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -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;