diff options
Diffstat (limited to 'bugs')
| -rw-r--r-- | bugs | 21 |
1 files changed, 21 insertions, 0 deletions
| @@ -669,3 +669,24 @@ patch = [[ | |||
| 669 | ]] | 669 | ]] |
| 670 | } | 670 | } |
| 671 | 671 | ||
| 672 | |||
| 673 | Bug{ | ||
| 674 | what = [[lua_getupvalue and setupvalue do not check for index too small]], | ||
| 675 | |||
| 676 | report = [[Mike Pall, ?/2004]], | ||
| 677 | |||
| 678 | example = [[debug.getupvalue(function() end, 0)]], | ||
| 679 | |||
| 680 | patch = [[ | ||
| 681 | * lapi.c | ||
| 682 | 941c941 | ||
| 683 | < if (n > f->c.nupvalues) return NULL; | ||
| 684 | --- | ||
| 685 | > if (!(1 <= n && n <= f->c.nupvalues)) return NULL; | ||
| 686 | 947c947 | ||
| 687 | < if (n > p->sizeupvalues) return NULL; | ||
| 688 | --- | ||
| 689 | > if (!(1 <= n && n <= p->sizeupvalues)) return NULL; | ||
| 690 | ]] | ||
| 691 | } | ||
| 692 | |||
