summaryrefslogtreecommitdiff
path: root/deps/lua/src
diff options
context:
space:
mode:
Diffstat (limited to 'deps/lua/src')
-rw-r--r--deps/lua/src/lua_cmsgpack.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/deps/lua/src/lua_cmsgpack.c b/deps/lua/src/lua_cmsgpack.c
index 90a388f3f..ba75ed455 100644
--- a/deps/lua/src/lua_cmsgpack.c
+++ b/deps/lua/src/lua_cmsgpack.c
@@ -515,6 +515,9 @@ int mp_pack(lua_State *L) {
if (nargs == 0)
return luaL_argerror(L, 0, "MessagePack pack needs input.");
+ if (!lua_checkstack(L, nargs))
+ return luaL_argerror(L, 0, "Too many arguments for MessagePack pack.");
+
buf = mp_buf_new(L);
for(i = 1; i <= nargs; i++) {
/* Copy argument i to top of stack for _encode processing;