aboutsummaryrefslogtreecommitdiff
path: root/bugs
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-08-17 14:45:45 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-08-17 14:45:45 -0300
commit271e05917f7782db2301e04923423b00994c75db (patch)
treedfd41b86c5cda2678873dc8d516b8fc76bcef98e /bugs
parentfe8c365281f0f23f24ea79357296b8b9c91b7fdb (diff)
downloadlua-271e05917f7782db2301e04923423b00994c75db.tar.gz
lua-271e05917f7782db2301e04923423b00994c75db.tar.bz2
lua-271e05917f7782db2301e04923423b00994c75db.zip
bug: lua_getupvalue and setupvalue do not check for index too small.
Diffstat (limited to 'bugs')
-rw-r--r--bugs21
1 files changed, 21 insertions, 0 deletions
diff --git a/bugs b/bugs
index 5ad6f1c5..2efc9aba 100644
--- a/bugs
+++ b/bugs
@@ -669,3 +669,24 @@ patch = [[
669]] 669]]
670} 670}
671 671
672
673Bug{
674what = [[lua_getupvalue and setupvalue do not check for index too small]],
675
676report = [[Mike Pall, ?/2004]],
677
678example = [[debug.getupvalue(function() end, 0)]],
679
680patch = [[
681* lapi.c
682941c941
683< if (n > f->c.nupvalues) return NULL;
684---
685> if (!(1 <= n && n <= f->c.nupvalues)) return NULL;
686947c947
687< if (n > p->sizeupvalues) return NULL;
688---
689> if (!(1 <= n && n <= p->sizeupvalues)) return NULL;
690]]
691}
692