diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-08-17 14:45:45 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-08-17 14:45:45 -0300 |
commit | 271e05917f7782db2301e04923423b00994c75db (patch) | |
tree | dfd41b86c5cda2678873dc8d516b8fc76bcef98e /bugs | |
parent | fe8c365281f0f23f24ea79357296b8b9c91b7fdb (diff) | |
download | lua-github-271e05917f7782db2301e04923423b00994c75db.tar.gz |
bug: lua_getupvalue and setupvalue do not check for index too small.
Diffstat (limited to 'bugs')
-rw-r--r-- | bugs | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -669,3 +669,24 @@ patch = [[ ]] } + +Bug{ +what = [[lua_getupvalue and setupvalue do not check for index too small]], + +report = [[Mike Pall, ?/2004]], + +example = [[debug.getupvalue(function() end, 0)]], + +patch = [[ +* lapi.c +941c941 +< if (n > f->c.nupvalues) return NULL; +--- +> if (!(1 <= n && n <= f->c.nupvalues)) return NULL; +947c947 +< if (n > p->sizeupvalues) return NULL; +--- +> if (!(1 <= n && n <= p->sizeupvalues)) return NULL; +]] +} + |