X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/6276434ad22ded9f5bf9997137c311e447154908..46c31a150a0e6a67eaaf4b1e1146ec815cc1355e:/src/scripting.c diff --git a/src/scripting.c b/src/scripting.c index 8c89c923..b1cbc6ff 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -167,6 +167,13 @@ int luaRedisGenericCommand(lua_State *lua, int raise_error) { redisClient *c = server.lua_client; sds reply; + /* Require at least one argument */ + if (argc == 0) { + luaPushError(lua, + "Please specify at least one argument for redis.call()"); + return 1; + } + /* Build the arguments vector */ argv = zmalloc(sizeof(robj*)*argc); for (j = 0; j < argc; j++) {