Halt parsing when invalid packets are found

This commit is contained in:
Shoghi Cervantes 2014-02-08 21:16:51 +01:00
parent 296c6904b9
commit a8b26a3caf
2 changed files with 2 additions and 0 deletions

View File

@ -54,6 +54,7 @@ abstract class RakNetDataPacket extends stdClass{
protected function get($len){
if($len <= 0){
$this->offset = strlen($this->buffer) - 1;
return "";
}
if($len === true){

View File

@ -36,6 +36,7 @@ class RakNetParser{
private function get($len){
if($len <= 0){
$this->offset = strlen($this->buffer) - 1;
return "";
}
if($len === true){