game: fix Classic/TBC SMSG_GROUP_LIST parsing - missing roles byte

WotLK 3.3.5a added a group-level and per-member roles byte (tank/healer/dps)
for the Dungeon Finder system. Classic 1.12 and TBC 2.4.3 do not send this byte.

The previous GroupListParser always read the roles byte, causing a one-byte
misalignment in Classic/TBC group lists that corrupted member GUID reads and
all subsequent fields (loot method, leader GUID, etc.).

GroupListParser::parse now takes a hasRoles parameter (default true for
backward compatibility). handleGroupList passes hasRoles=isActiveExpansion("wotlk").
Also adds range-checking throughout to prevent out-of-bounds reads on
malformed or unexpectedly short group list packets.
This commit is contained in:
Kelsi 2026-03-10 00:58:56 -07:00
parent 04f22376ce
commit a0979b9cd8
3 changed files with 66 additions and 26 deletions

View file

@ -1855,7 +1855,9 @@ public:
/** SMSG_GROUP_LIST parser */
class GroupListParser {
public:
static bool parse(network::Packet& packet, GroupListData& data);
// hasRoles: WotLK 3.3.5a added a roles byte at group level and per-member for LFD.
// Classic 1.12 and TBC 2.4.3 do not send this byte.
static bool parse(network::Packet& packet, GroupListData& data, bool hasRoles = true);
};
/** SMSG_PARTY_COMMAND_RESULT data */