diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-01-22 18:02:04 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-01-22 18:02:04 -0200 |
| commit | 0a850e641d90dde8d55c299e0197eb7148072df9 (patch) | |
| tree | 8f7da902c8218ef83aea8240d3215719fd19a527 | |
| parent | 916bd874ad7270a89ae07fc76ddac00a34272fe9 (diff) | |
| download | lua-0a850e641d90dde8d55c299e0197eb7148072df9.tar.gz lua-0a850e641d90dde8d55c299e0197eb7148072df9.tar.bz2 lua-0a850e641d90dde8d55c299e0197eb7148072df9.zip | |
larger limit + better error messages for loop detection in inheritance
| -rw-r--r-- | lvm.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.c,v 2.182 2013/12/18 14:12:03 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.183 2013/12/30 20:47:58 roberto Exp roberto $ |
| 3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -30,7 +30,7 @@ | |||
| 30 | 30 | ||
| 31 | 31 | ||
| 32 | /* limit for table tag-method chains (to avoid loops) */ | 32 | /* limit for table tag-method chains (to avoid loops) */ |
| 33 | #define MAXTAGLOOP 100 | 33 | #define MAXTAGLOOP 2000 |
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | /* maximum length of the conversion of a number to a string */ | 36 | /* maximum length of the conversion of a number to a string */ |
| @@ -122,7 +122,7 @@ void luaV_gettable (lua_State *L, const TValue *t, TValue *key, StkId val) { | |||
| 122 | } | 122 | } |
| 123 | t = tm; /* else repeat with 'tm' */ | 123 | t = tm; /* else repeat with 'tm' */ |
| 124 | } | 124 | } |
| 125 | luaG_runerror(L, "loop in gettable"); | 125 | luaG_runerror(L, "gettable chain too long; possible loop"); |
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | 128 | ||
| @@ -161,7 +161,7 @@ void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) { | |||
| 161 | } | 161 | } |
| 162 | t = tm; /* else repeat with 'tm' */ | 162 | t = tm; /* else repeat with 'tm' */ |
| 163 | } | 163 | } |
| 164 | luaG_runerror(L, "loop in settable"); | 164 | luaG_runerror(L, "settable chain too long; possible loop"); |
| 165 | } | 165 | } |
| 166 | 166 | ||
| 167 | 167 | ||
