mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 16:49:53 +00:00
Halt parsing when invalid packets are found
This commit is contained in:
parent
296c6904b9
commit
a8b26a3caf
@ -54,6 +54,7 @@ abstract class RakNetDataPacket extends stdClass{
|
|||||||
|
|
||||||
protected function get($len){
|
protected function get($len){
|
||||||
if($len <= 0){
|
if($len <= 0){
|
||||||
|
$this->offset = strlen($this->buffer) - 1;
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
if($len === true){
|
if($len === true){
|
||||||
|
@ -36,6 +36,7 @@ class RakNetParser{
|
|||||||
|
|
||||||
private function get($len){
|
private function get($len){
|
||||||
if($len <= 0){
|
if($len <= 0){
|
||||||
|
$this->offset = strlen($this->buffer) - 1;
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
if($len === true){
|
if($len === true){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user