Forráskód Böngészése

'debug.getfenv' does not check whether it has an argument

Roberto Ierusalimschy 16 éve
szülő
commit
decada8dc2
1 módosított fájl, 21 hozzáadás és 2 törlés
  1. 21 2
      bugs

+ 21 - 2
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;
+ }
+]],
 }
+