File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed
Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ static int db_getinfo (lua_State *L) {
152152 lua_State * L1 = getthread (L , & arg );
153153 const char * options = luaL_optstring (L , arg + 2 , "flnSrtu" );
154154 checkstack (L , L1 , 3 );
155+ luaL_argcheck (L , options [0 ] != '>' , arg + 2 , "invalid option '>'" );
155156 if (lua_isfunction (L , arg + 1 )) { /* info about a function? */
156157 options = lua_pushfstring (L , ">%s" , options ); /* add '>' to 'options' */
157158 lua_pushvalue (L , arg + 1 ); /* move function to 'L1' stack */
Original file line number Diff line number Diff line change 3131
3232do
3333 assert (not pcall (debug.getinfo , print , " X" )) -- invalid option
34+ assert (not pcall (debug.getinfo , 0 , " >" )) -- invalid option
3435 assert (not debug.getinfo (1000 )) -- out of range level
3536 assert (not debug.getinfo (- 1 )) -- out of range level
3637 local a = debug.getinfo (print )
You can’t perform that action at this time.
0 commit comments