mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
fix(combatlog): reject truncated spell go packets missing counts
This commit is contained in:
parent
b24da8463c
commit
bcfdcce062
3 changed files with 52 additions and 37 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue