From 09ab5591fab7e347406252fe71eb3f4da6fe04bf Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 2 May 2011 23:04:08 +0200 Subject: [PATCH] Fixed a problem in the script engine that crashed the server if the reply was not stored just int the static buffer of the client structure. --- src/scripting.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripting.c b/src/scripting.c index 7bc78425..65cbed62 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -184,7 +184,7 @@ int luaRedisCommand(lua_State *lua) { while(listLength(c->reply)) { robj *o = listNodeValue(listFirst(c->reply)); - sdscatlen(reply,o->ptr,sdslen(o->ptr)); + reply = sdscatlen(reply,o->ptr,sdslen(o->ptr)); listDelNode(c->reply,listFirst(c->reply)); } redisProtocolToLuaType(lua,reply); -- 2.47.2