mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 09:10:00 +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;
|
$w = $v | 0x80;
|
||||||
}
|
}
|
||||||
$buf .= self::writeByte($w);
|
$buf .= self::writeByte($w);
|
||||||
$v >>= 7;
|
$v = (($v >> 7) & (PHP_INT_MAX >> 6)); //PHP really needs a logical right-shift operator
|
||||||
}while($v);
|
}while($v);
|
||||||
|
|
||||||
return $buf;
|
return $buf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user