Bugfix Json consumer logic

This commit is contained in:
Christopher Vagnetoft committed 2026-04-03 01:42:41 +02:00
1 parent 62a1167055
commit 389da4e655
1 file changed
+3
+3
View File
@@ -91,6 +91,9 @@ class JsonProtocol implements ProtocolInterface
{
// check for $this->prependSizeBytes
if ($this->prependSizeBytes > 0) {
if (strlen($data) < $this->prependSizeBytes) {
return null;
}
$len = $this->unpackSizeBytes($data);
// if size is greater than data (i.e. incomplete)
if ($len > strlen($data) - $this->prependSizeBytes) return null;