Skip to content

Commit a88b51f

Browse files
authored
Fixed amphp#40 - unpack not having enough input
1 parent c784784 commit a88b51f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/Processor.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -987,8 +987,8 @@ private function parseCompression() {
987987
$buf = "";
988988

989989
while (true) {
990-
while (\strlen($buf) < 4) {
991-
$buf .= (yield $inflated);
990+
while (\strlen($buf) < 7) {
991+
$buf .= yield $inflated;
992992
$inflated = "";
993993
}
994994

@@ -1000,7 +1000,7 @@ private function parseCompression() {
10001000

10011001
if ($size > 0) {
10021002
while (\strlen($buf) < $size) {
1003-
$buf .= (yield $inflated);
1003+
$buf .= yield $inflated;
10041004
$inflated = "";
10051005
}
10061006

@@ -1028,7 +1028,7 @@ private function parseMysql(): \Generator {
10281028

10291029
do {
10301030
while (\strlen($buf) < 4) {
1031-
$buf .= (yield $parsed);
1031+
$buf .= yield $parsed;
10321032
$parsed = [];
10331033
}
10341034

@@ -1037,7 +1037,7 @@ private function parseMysql(): \Generator {
10371037
$buf = substr($buf, 4);
10381038

10391039
while (\strlen($buf) < ($len & 0xffffff)) {
1040-
$buf .= (yield $parsed);
1040+
$buf .= yield $parsed;
10411041
$parsed = [];
10421042
}
10431043

0 commit comments

Comments
 (0)