lua

A copy of the Lua development repository
Log | Files | Refs | README

commit decada8dc2e6ae9c95e4dd3fe3a12762535f95cc
parent ee5d03b42af9831d7a3e64d05500b99018d53692
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Tue,  4 Aug 2009 15:50:55 -0300

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

Diffstat:
Mbugs | 23+++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/bugs b/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; + } +]], } +