mirror of
https://github.com/lua/lua.git
synced 2024-11-27 12:13:38 +08:00
'debug.getfenv' does not check whether it has an argument
This commit is contained in:
parent
ee5d03b42a
commit
decada8dc2
23
bugs
23
bugs
@ -1880,8 +1880,8 @@ patch = [[
|
||||
+++ lundump.c 2008/04/04 19:51:41 2.7.1.4
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
-** $Id: bugs,v 1.101 2009/07/01 21:10:33 roberto Exp roberto $
|
||||
+** $Id: bugs,v 1.101 2009/07/01 21:10:33 roberto Exp roberto $
|
||||
-** $Id: bugs,v 1.102 2009/07/02 19:57:34 roberto Exp roberto $
|
||||
+** $Id: bugs,v 1.102 2009/07/02 19:57:34 roberto Exp roberto $
|
||||
** load precompiled Lua chunks
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@ -2212,4 +2212,23 @@ too many values in its stack and confuse its stack indices.
|
||||
patch = [[
|
||||
]],
|
||||
}
|
||||
|
||||
But{
|
||||
what = [['debug.getfenv' does not check whether it has an argument]],
|
||||
report = [[Patrick Donnelly, 2009/07/30]],
|
||||
since = [[5.1]],
|
||||
example = [[debug.getfenv() -- should raise an error]],
|
||||
patch = [[
|
||||
--- ldblib.c 2008/01/21 13:11:21 1.104.1.3
|
||||
+++ ldblib.c 2009/08/04 18:43:12
|
||||
@@ -45,6 +45,7 @@
|
||||
|
||||
|
||||
static int db_getfenv (lua_State *L) {
|
||||
+ luaL_checkany(L, 1);
|
||||
lua_getfenv(L, 1);
|
||||
return 1;
|
||||
}
|
||||
]],
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user