From: antirez Date: Mon, 2 May 2011 21:04:08 +0000 (+0200) Subject: Fixed a problem in the script engine that crashed the server if the reply was not... X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/09ab5591fab7e347406252fe71eb3f4da6fe04bf?ds=sidebyside;hp=0d916763afa44c2c6d5e28a4fe0f167197b00fc7 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. --- 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);