Fix possible bug occuring during shuffling of raid subgroups, and prevent client side exploit. Author: Vladimir.
--HG-- branch : trunk
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
|
||||
#define MAXGROUPSIZE 5
|
||||
#define MAXRAIDSIZE 40
|
||||
#define MAX_RAID_SUBGROUPS MAXRAIDSIZE/MAXGROUPSIZE
|
||||
#define TARGETICONCOUNT 8
|
||||
|
||||
enum RollVote
|
||||
@@ -260,7 +261,7 @@ class Group
|
||||
{
|
||||
member_citerator mslot = _getMemberCSlot(guid);
|
||||
if (mslot == m_memberSlots.end())
|
||||
return (MAXRAIDSIZE/MAXGROUPSIZE+1);
|
||||
return (MAX_RAID_SUBGROUPS+1);
|
||||
|
||||
return mslot->group;
|
||||
}
|
||||
@@ -381,9 +382,9 @@ class Group
|
||||
{
|
||||
// Sub group counters initialization
|
||||
if (!m_subGroupsCounts)
|
||||
m_subGroupsCounts = new uint8[MAXRAIDSIZE / MAXGROUPSIZE];
|
||||
m_subGroupsCounts = new uint8[MAX_RAID_SUBGROUPS];
|
||||
|
||||
memset((void*)m_subGroupsCounts, 0, (MAXRAIDSIZE / MAXGROUPSIZE)*sizeof(uint8));
|
||||
memset((void*)m_subGroupsCounts, 0, (MAX_RAID_SUBGROUPS)*sizeof(uint8));
|
||||
|
||||
for (member_citerator itr = m_memberSlots.begin(); itr != m_memberSlots.end(); ++itr)
|
||||
++m_subGroupsCounts[itr->group];
|
||||
|
||||
Reference in New Issue
Block a user