From 0cd643d7cfc21bc8b6153d42b86a71d557270988 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sat, 10 Aug 2019 00:54:41 +0200 Subject: [PATCH] Fix debug.getinfo() argument check. Thanks to Sergey Ostanevich. --- src/lj_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lj_debug.c b/src/lj_debug.c index a684302c..7222e2ac 100644 --- a/src/lj_debug.c +++ b/src/lj_debug.c @@ -440,7 +440,7 @@ int lj_debug_getinfo(lua_State *L, const char *what, lj_Debug *ar, int ext) GCfunc *fn; if (*what == '>') { TValue *func = L->top - 1; - api_check(L, tvisfunc(func)); + if (!tvisfunc(func)) return 0; fn = funcV(func); L->top--; what++;