mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-10-25 21:50:02 +00:00
error on string OOB
This commit is contained in:
1 parent
f6166460ff
commit
5d91c5fde5
1 file changed
+4
@@ -44,6 +44,10 @@ void TCPSend(const std::string&Data){
|
|||||||
Sent = 0;
|
Sent = 0;
|
||||||
Size += 4;
|
Size += 4;
|
||||||
do{
|
do{
|
||||||
|
if (size_t(Sent) >= Send.size()) {
|
||||||
|
error(Sec("string OOB in ") + std::string(__func__));
|
||||||
|
return;
|
||||||
|
}
|
||||||
Temp = send(TCPSock, &Send[Sent], Size - Sent, 0);
|
Temp = send(TCPSock, &Send[Sent], Size - Sent, 0);
|
||||||
if(!CheckBytes(Temp))return;
|
if(!CheckBytes(Temp))return;
|
||||||
Sent += Temp;
|
Sent += Temp;
|
||||||
|
|||||||
Reference in new issue
Block a user