You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
Fix parser regression. Out of memory resulted in an endless loop
This commit is contained in:
@@ -220,6 +220,11 @@ ReplyParser.prototype._packetEndOffset = function () {
|
||||
|
||||
while (this._buffer[offset] !== 0x0d && this._buffer[offset + 1] !== 0x0a) {
|
||||
offset++;
|
||||
|
||||
/* istanbul ignore if: activate the js parser out of memory test to test this */
|
||||
if (offset >= this._buffer.length) {
|
||||
throw new IncompleteReadBuffer("didn't see LF after NL reading multi bulk count (" + offset + " => " + this._buffer.length + ", " + this._offset + ")");
|
||||
}
|
||||
}
|
||||
|
||||
offset++;
|
||||
|
Reference in New Issue
Block a user