mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 07:21:48 +00:00
Fix for a potential buffer overflow on login server under very rare circumstances via Rogean. Fix for perl parser not clearing errors via sorvani
This commit is contained in:
parent
a9b4e7819f
commit
c725ee84bb
@ -201,6 +201,13 @@ bool WorldServer::Process()
|
|||||||
}
|
}
|
||||||
case ServerOP_LSAccountUpdate:
|
case ServerOP_LSAccountUpdate:
|
||||||
{
|
{
|
||||||
|
if(app->size < sizeof(ServerLSAccountUpdate_Struct))
|
||||||
|
{
|
||||||
|
server_log->Log(log_network_error, "Recieved application packet from server that had opcode ServerLSAccountUpdate_Struct, "
|
||||||
|
"but was too small. Discarded to avoid buffer overrun.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
server_log->Log(log_network_trace, "ServerOP_LSAccountUpdate packet received from: %s", short_name.c_str());
|
server_log->Log(log_network_trace, "ServerOP_LSAccountUpdate packet received from: %s", short_name.c_str());
|
||||||
ServerLSAccountUpdate_Struct *lsau = (ServerLSAccountUpdate_Struct*)app->pBuffer;
|
ServerLSAccountUpdate_Struct *lsau = (ServerLSAccountUpdate_Struct*)app->pBuffer;
|
||||||
if(trusted)
|
if(trusted)
|
||||||
|
|||||||
@ -126,7 +126,6 @@ PerlembParser::~PerlembParser() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PerlembParser::ReloadQuests() {
|
void PerlembParser::ReloadQuests() {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if(perl == nullptr) {
|
if(perl == nullptr) {
|
||||||
perl = new Embperl;
|
perl = new Embperl;
|
||||||
@ -145,6 +144,7 @@ void PerlembParser::ReloadQuests() {
|
|||||||
throw e.what();
|
throw e.what();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
errors_.clear();
|
||||||
npc_quest_status_.clear();
|
npc_quest_status_.clear();
|
||||||
global_npc_quest_status_ = questUnloaded;
|
global_npc_quest_status_ = questUnloaded;
|
||||||
player_quest_status_ = questUnloaded;
|
player_quest_status_ = questUnloaded;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user