diff --git a/lualib-src/lua-cluster.c b/lualib-src/lua-cluster.c index a050f3c0..da671278 100644 --- a/lualib-src/lua-cluster.c +++ b/lualib-src/lua-cluster.c @@ -366,6 +366,8 @@ lunpackrequest(lua_State *L) { msg = luaL_checklstring(L,1,&ssz); sz = (int)ssz; } + if (sz == 0) + return luaL_error(L, "Invalid req package. size == 0"); switch (msg[0]) { case 0: return unpackreq_number(L, (const uint8_t *)msg, sz);