Bugfix Json consumer logic
This commit is contained in:
1 parent
62a1167055
commit
389da4e655
1 file changed
+3
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user