From: antirez Date: Tue, 1 Sep 2009 14:30:52 +0000 (+0200) Subject: Fixed crash with only space and newline as command (issue 61), thanks to a guy having... X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/af807d87e8e30978f9a0d162b8004a4af8e4e3a3?ds=inline Fixed crash with only space and newline as command (issue 61), thanks to a guy having as nick "fixxxerrr" --- diff --git a/redis.c b/redis.c index 7d3bc564..607c827a 100644 --- a/redis.c +++ b/redis.c @@ -1488,7 +1488,7 @@ again: /* Execute the command. If the client is still valid * after processCommand() return and there is something * on the query buffer try to process the next command. */ - if (processCommand(c) && sdslen(c->querybuf)) goto again; + if (c->argc && processCommand(c) && sdslen(c->querybuf)) goto again; return; } else if (sdslen(c->querybuf) >= REDIS_REQUEST_MAX_SIZE) { redisLog(REDIS_DEBUG, "Client protocol error");