[Crash] Stability Fixes (#2489)

* Input sanitation for #zone

* Update zone.cpp

* Update clientlist.cpp

* Test

* Test

* Remove logging, revert /who all code

* Remove log

* Update clientlist.cpp
This commit is contained in:
Chris Miles
2022-10-15 15:17:50 -05:00
committed by GitHub
parent bbbebdd346
commit 7092183103
5 changed files with 66 additions and 48 deletions
+10 -1
View File
@@ -8,5 +8,14 @@ void WorldserverCLI::TestCommand(int argc, char **argv, argh::parser &cmd, std::
return;
}
zone_store.GetZoneName(0, false);
zone_store.LoadZones(database);
const char* zonename = ZoneName(0);
if (zonename == 0) {
LogInfo("Zone name is 0");
}
if (zonename == nullptr) {
LogInfo("Zone name is nullptr");
}
}
+1 -1
View File
@@ -686,8 +686,8 @@ void ClientList::SendWhoAll(uint32 fromid,const char* to, int16 admin, Who_All_S
int idx=-1;
while(iterator.MoreElements()) {
cle = iterator.GetData();
const char* tmpZone = ZoneName(cle->zone());
if (
(cle->Online() >= CLE_Status::Zoning) &&
(!cle->GetGM() || cle->Anon() != 1 || admin >= cle->Admin()) &&