mirror of
https://github.com/predis/predis.git
synced 2026-09-12 11:27:05 +00:00
More strict check of the length argument for a network read.
This commit is contained in:
+1
-1
@@ -1380,7 +1380,7 @@ class Connection implements IConnection {
|
||||
}
|
||||
|
||||
public function readBytes($length) {
|
||||
if ($length == 0) {
|
||||
if ($length <= 0) {
|
||||
throw new \InvalidArgumentException('Length parameter must be greater than 0');
|
||||
}
|
||||
$socket = $this->getSocket();
|
||||
|
||||
Reference in New Issue
Block a user