mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
[Bug Fix] Fix Crash in ClientList::GetCLEIP (#4173)
* [Bug Fix] Fix Crash in ClientList::GetCLEIP # Notes - We were not validating pointer when moving to next iterator. # Crashes https://spire.akkadius.com/dev/release/22.46.1?id=19955 https://spire.akkadius.com/dev/release/22.46.1?id=19948 https://spire.akkadius.com/dev/release/22.46.0?id=19945 * Update clientlist.cpp * Update clientlist.cpp
This commit is contained in:
parent
5013459824
commit
957b4f8821
@ -94,12 +94,20 @@ void ClientList::GetCLEIP(uint32 in_ip) {
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
iterator.Reset();
|
iterator.Reset();
|
||||||
|
|
||||||
|
const auto& zones = Strings::Split(RuleS(World, IPExemptionZones), ",");
|
||||||
|
|
||||||
while (iterator.MoreElements()) {
|
while (iterator.MoreElements()) {
|
||||||
cle = iterator.GetData();
|
cle = iterator.GetData();
|
||||||
|
|
||||||
const auto zones = Strings::Split(RuleS(World, IPExemptionZones), ",");
|
if (!zones.empty() && cle->zone()) {
|
||||||
for (const auto &z : zones) {
|
auto it = std::ranges::find_if(
|
||||||
if (Strings::ToUnsignedInt(z) == cle->zone()) {
|
zones,
|
||||||
|
[cle](const auto& z) {
|
||||||
|
return Strings::ToUnsignedInt(z) == cle->zone();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
if (it != zones.end()) {
|
||||||
iterator.Advance();
|
iterator.Advance();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user