fix(combatlog): reject truncated spell go packets missing counts

This commit is contained in:
Kelsi 2026-03-14 13:37:28 -07:00
parent b24da8463c
commit bcfdcce062
3 changed files with 52 additions and 37 deletions

View file

@ -3782,9 +3782,11 @@ bool SpellGoParser::parse(network::Packet& packet, SpellGoData& data) {
}
data.hitCount = static_cast<uint8_t>(data.hitTargets.size());
// Validate missCount field exists
// missCount is mandatory in SMSG_SPELL_GO. Missing byte means truncation.
if (packet.getSize() - packet.getReadPos() < 1) {
return true; // Valid, just no misses
LOG_WARNING("Spell go: missing missCount after hit target list");
packet.setReadPos(startPos);
return false;
}
const uint8_t rawMissCount = packet.readUInt8();