diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-08-04 15:51:19 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-08-04 15:51:19 -0300 |
commit | decada8dc2e6ae9c95e4dd3fe3a12762535f95cc (patch) | |
tree | 6bd477305237c5b2c778e19bd3d60a47021b6ec9 | |
parent | ee5d03b42af9831d7a3e64d05500b99018d53692 (diff) | |
download | lua-decada8dc2e6ae9c95e4dd3fe3a12762535f95cc.tar.gz lua-decada8dc2e6ae9c95e4dd3fe3a12762535f95cc.tar.bz2 lua-decada8dc2e6ae9c95e4dd3fe3a12762535f95cc.zip |
'debug.getfenv' does not check whether it has an argument
-rw-r--r-- | bugs | 23 |
1 files changed, 21 insertions, 2 deletions
@@ -1880,8 +1880,8 @@ patch = [[ | |||
1880 | +++ lundump.c 2008/04/04 19:51:41 2.7.1.4 | 1880 | +++ lundump.c 2008/04/04 19:51:41 2.7.1.4 |
1881 | @@ -1,5 +1,5 @@ | 1881 | @@ -1,5 +1,5 @@ |
1882 | /* | 1882 | /* |
1883 | -** $Id: bugs,v 1.101 2009/07/01 21:10:33 roberto Exp roberto $ | 1883 | -** $Id: bugs,v 1.102 2009/07/02 19:57:34 roberto Exp roberto $ |
1884 | +** $Id: bugs,v 1.101 2009/07/01 21:10:33 roberto Exp roberto $ | 1884 | +** $Id: bugs,v 1.102 2009/07/02 19:57:34 roberto Exp roberto $ |
1885 | ** load precompiled Lua chunks | 1885 | ** load precompiled Lua chunks |
1886 | ** See Copyright Notice in lua.h | 1886 | ** See Copyright Notice in lua.h |
1887 | */ | 1887 | */ |
@@ -2212,4 +2212,23 @@ too many values in its stack and confuse its stack indices. | |||
2212 | patch = [[ | 2212 | patch = [[ |
2213 | ]], | 2213 | ]], |
2214 | } | 2214 | } |
2215 | |||
2216 | But{ | ||
2217 | what = [['debug.getfenv' does not check whether it has an argument]], | ||
2218 | report = [[Patrick Donnelly, 2009/07/30]], | ||
2219 | since = [[5.1]], | ||
2220 | example = [[debug.getfenv() -- should raise an error]], | ||
2221 | patch = [[ | ||
2222 | --- ldblib.c 2008/01/21 13:11:21 1.104.1.3 | ||
2223 | +++ ldblib.c 2009/08/04 18:43:12 | ||
2224 | @@ -45,6 +45,7 @@ | ||
2225 | |||
2226 | |||
2227 | static int db_getfenv (lua_State *L) { | ||
2228 | + luaL_checkany(L, 1); | ||
2229 | lua_getfenv(L, 1); | ||
2230 | return 1; | ||
2231 | } | ||
2232 | ]], | ||
2215 | } | 2233 | } |
2234 | |||