mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r18800) -Fix: in some cases with invalid packets one can crash recent trunk and 1.0.0 betas; 0.7.5 and before can't be crashed though.
This commit is contained in:
parent
f42b435d28
commit
83c8c562bb
@ -141,7 +141,7 @@ bool Packet::CanReadFromPacket(uint bytes_to_read)
|
||||
|
||||
/* Check if variable is within packet-size */
|
||||
if (this->pos + bytes_to_read > this->size) {
|
||||
this->cs->CloseConnection();
|
||||
this->cs->NetworkSocketHandler::CloseConnection();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user