mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 00:20:16 +00:00
fix(combatlog): validate packed proc log GUIDs
This commit is contained in:
parent
dbdc45a8a9
commit
0fc887a3d2
1 changed files with 12 additions and 4 deletions
|
|
@ -2110,9 +2110,15 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
return (packet.getSize() - packet.getReadPos() >= 8) ? packet.readUInt64() : 0;
|
||||
return UpdateObjectParser::readPackedGuid(packet);
|
||||
};
|
||||
if (packet.getSize() - packet.getReadPos() < (prUsesFullGuid ? 8u : 1u)) break;
|
||||
if (packet.getSize() - packet.getReadPos() < (prUsesFullGuid ? 8u : 1u)
|
||||
|| (!prUsesFullGuid && !hasFullPackedGuid(packet))) {
|
||||
packet.setReadPos(packet.getSize()); break;
|
||||
}
|
||||
uint64_t caster = readPrGuid();
|
||||
if (packet.getSize() - packet.getReadPos() < (prUsesFullGuid ? 8u : 1u)) break;
|
||||
if (packet.getSize() - packet.getReadPos() < (prUsesFullGuid ? 8u : 1u)
|
||||
|| (!prUsesFullGuid && !hasFullPackedGuid(packet))) {
|
||||
packet.setReadPos(packet.getSize()); break;
|
||||
}
|
||||
uint64_t victim = readPrGuid();
|
||||
if (packet.getSize() - packet.getReadPos() < 4) break;
|
||||
uint32_t spellId = packet.readUInt32();
|
||||
|
|
@ -6391,11 +6397,13 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
return (packet.getSize() - packet.getReadPos() >= 8) ? packet.readUInt64() : 0;
|
||||
return UpdateObjectParser::readPackedGuid(packet);
|
||||
};
|
||||
if (packet.getSize() - packet.getReadPos() < (procChanceUsesFullGuid ? 8u : 1u)) {
|
||||
if (packet.getSize() - packet.getReadPos() < (procChanceUsesFullGuid ? 8u : 1u)
|
||||
|| (!procChanceUsesFullGuid && !hasFullPackedGuid(packet))) {
|
||||
packet.setReadPos(packet.getSize()); break;
|
||||
}
|
||||
uint64_t procTargetGuid = readProcChanceGuid();
|
||||
if (packet.getSize() - packet.getReadPos() < (procChanceUsesFullGuid ? 8u : 1u)) {
|
||||
if (packet.getSize() - packet.getReadPos() < (procChanceUsesFullGuid ? 8u : 1u)
|
||||
|| (!procChanceUsesFullGuid && !hasFullPackedGuid(packet))) {
|
||||
packet.setReadPos(packet.getSize()); break;
|
||||
}
|
||||
uint64_t procCasterGuid = readProcChanceGuid();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue