mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 00:39:45 +00:00
NetworkBinaryStream: fix server crash on wrong skindata size, close #3276
This commit is contained in:
parent
a4b810977a
commit
00869e81ba
@ -148,7 +148,11 @@ class NetworkBinaryStream extends BinaryStream{
|
||||
$width = $this->getLInt();
|
||||
$height = $this->getLInt();
|
||||
$data = $this->getString();
|
||||
return new SkinImage($height, $width, $data);
|
||||
try{
|
||||
return new SkinImage($height, $width, $data);
|
||||
}catch(\InvalidArgumentException $e){
|
||||
throw new BadPacketException($e->getMessage(), 0, $e);
|
||||
}
|
||||
}
|
||||
|
||||
private function putSkinImage(SkinImage $image) : void{
|
||||
|
Loading…
x
Reference in New Issue
Block a user