mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Fix potential security flaws caused by uncontrolled format strings
Make sure format strings are string literals to avoid an uncontrolled format string situation.
This commit is contained in:
parent
cebca2ca04
commit
94d30b759d
@ -41,7 +41,7 @@ void _Error(char* fmt, ...)
|
||||
}/////////////////////////////
|
||||
|
||||
Error(eDLL_T::ENGINE, NO_ERROR, "%s", buf);
|
||||
v_Error(buf);
|
||||
v_Error("%s", buf);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -68,7 +68,7 @@ void _Warning(int level, char* fmt, ...)
|
||||
Warning(eDLL_T::COMMON, "Warning(%d):%s", level, buf);
|
||||
}
|
||||
|
||||
v_Warning(level, buf);
|
||||
v_Warning(level, "%s", buf);
|
||||
}
|
||||
|
||||
#ifndef DEDICATED
|
||||
|
@ -227,7 +227,7 @@ void CBanSystem::BanListCheck(void)
|
||||
string svIpAddress = pNetChan->GetAddress();
|
||||
|
||||
Warning(eDLL_T::SERVER, "Removing client '%s' from slot '%i' ('%llu' is banned from this server!)\n", svIpAddress.c_str(), c, pClient->GetNucleusID());
|
||||
pClient->Disconnect(Reputation_t::REP_MARK_BAD, m_vRefuseList[i].first.c_str());
|
||||
pClient->Disconnect(Reputation_t::REP_MARK_BAD, "%s", m_vRefuseList[i].first.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user