Add PET_BUFF_COUNT guard on pet buff load to prevent out-of-bounds write

Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-09 17:11:24 +00:00
parent 6dc4600596
commit 80bd422922

View File

@ -3363,7 +3363,7 @@ void ZoneDatabase::LoadPetInfo(Client *client)
continue;
}
if (e.slot >= RuleI(Spells, MaxTotalSlotsPET)) {
if (e.slot >= RuleI(Spells, MaxTotalSlotsPET) || e.slot >= PET_BUFF_COUNT) {
continue;
}