We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 134152f commit b54e5acCopy full SHA for b54e5ac
src/ASN1/Decoder/Decoder.php
@@ -73,6 +73,13 @@ public function fromBinary(&$binaryData, &$offsetIndex = 0)
73
} else {
74
if ($contentLength->getLengthForm() === ContentLength::INDEFINITE_FORM) {
75
for (;;) {
76
+ if (\strlen($binaryData) <= $offsetIndex) {
77
+ throw new ParserException(
78
+ 'Can not parse binary from data: Offset index larger than input size',
79
+ $offsetIndex
80
+ );
81
+ }
82
+
83
$firstOctet = $binaryData[$offsetIndex];
84
$secondOctet = $binaryData[$offsetIndex++];
85
if ($firstOctet . $secondOctet === \chr(0) . \chr(0)) {
0 commit comments