You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-07 13:22:56 +03:00
In nested MULTIBULK buffers, correctly recurse on an incomplete read buffer.
Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
This commit is contained in:
@@ -117,15 +117,15 @@ ReplyParser.prototype._parseResult = function (type) {
|
||||
offset = this._offset;
|
||||
packetHeader = new Packet(type, this.parseHeader());
|
||||
|
||||
if (packetHeader.size > this._bytesRemaining()) {
|
||||
this._offset = offset - 1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (packetHeader.size < 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (packetHeader.size > this._bytesRemaining()) {
|
||||
this._offset = offset - 1;
|
||||
throw new IncompleteReadBuffer("Wait for more data.");
|
||||
}
|
||||
|
||||
var reply = [ ];
|
||||
var ntype, i, res;
|
||||
|
||||
|
Reference in New Issue
Block a user