Skip to content

Commit cb90a6f

Browse files
committed
Fix checking chunked size exceeding integer bounds (PHP 8)
1 parent db00f68 commit cb90a6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Io/ChunkedDecoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function handleData($data)
123123
}
124124

125125
$this->chunkSize = @\hexdec($hexValue);
126-
if (\dechex($this->chunkSize) !== $hexValue) {
126+
if (!\is_int($this->chunkSize) || \dechex($this->chunkSize) !== $hexValue) {
127127
$this->handleError(new Exception($hexValue . ' is not a valid hexadecimal number'));
128128
return;
129129
}

0 commit comments

Comments
 (0)