From e623bd22bab45d8ce20d82bb2de5e8ed82f9e7bf Mon Sep 17 00:00:00 2001 From: "zhaozhao.zz" Date: Tue, 14 Aug 2018 13:55:30 +0800 Subject: [PATCH] networking: just return C_OK if multibulk processing saw a <= 0 length. --- src/networking.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/networking.c b/src/networking.c index 945fdd961..9e1a3a9ef 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1252,11 +1252,8 @@ int processMultibulkBuffer(client *c) { } c->qb_pos = (newline-c->querybuf)+2; - if (ll <= 0) { - sdsrange(c->querybuf,c->qb_pos,-1); - c->qb_pos = 0; - return C_OK; - } + + if (ll <= 0) return C_OK; c->multibulklen = ll;