mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +00:00
Fix large signed varint/negative number CPU leak
This commit is contained in:
parent
b1df4728d3
commit
750462aa75
@ -481,7 +481,7 @@ class Binary{
|
||||
$w = $v | 0x80;
|
||||
}
|
||||
$buf .= self::writeByte($w);
|
||||
$v >>= 7;
|
||||
$v = (($v >> 7) & (PHP_INT_MAX >> 6)); //PHP really needs a logical right-shift operator
|
||||
}while($v);
|
||||
|
||||
return $buf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user