diff --git a/module/lua/lapi.c b/module/lua/lapi.c index 726e5c2ad4..ed3a0f4cf9 100644 --- a/module/lua/lapi.c +++ b/module/lua/lapi.c @@ -250,6 +250,8 @@ LUA_API int lua_type (lua_State *L, int idx) { LUA_API const char *lua_typename (lua_State *L, int t) { UNUSED(L); + if (t > 8 || t < 0) + return "internal_type_error"; return ttypename(t); }