* update lua51 to 5.1.5-11

This commit is contained in:
Alexander Baldeck 2023-11-03 15:56:21 +01:00
parent d5a1944b2f
commit f26f1a3f8a
2 changed files with 30 additions and 5 deletions

View File

@ -1,26 +1,30 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Sébastien Luttringer <seblu@aur.archlinux.org>
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Sébastien Luttringer <seblu@archlinux.org>
# Contributor: Juergen Hoetzel <juergen@archlinux.org>
# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
pkgname=lua51
pkgver=5.1.5
pkgrel=9
pkgrel=11
pkgdesc='Powerful lightweight programming language designed for extending applications'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://www.lua.org/'
depends=('readline')
license=('MIT')
options=('!makeflags' '!emptydirs')
license=(MIT)
options=('!makeflags' '!emptydirs' '!distcc')
source=(https://www.lua.org/ftp/lua-$pkgver.tar.gz
cve-2014-5461.patch
lua-arch.patch
lua-5.1-cflags.diff)
sha512sums=('0142fefcbd13afcd9b201403592aa60620011cc8e8559d4d2db2f92739d18186860989f48caa45830ff4f99bfc7483287fd3ff3a16d4dec928e2767ce4d542a9'
'5b1eeb99e1392dd33bf3c116096b4e6f43578a37761854a22b9f904aa67f59eaafc295d0a9037cf8a77616865e5e44c64e6715cc1493869d756b57998d8d281b'
'7678986a9c5310a81c260cde0124d14f5c2dffebf0bc61a257ec1e39f63b5ec0bc2a6adf5c39cdbc45ba4594487f46bfafd20cb334ae965f3379c244b338fa00'
'cd135a2e6583ec0b059133b4383ccecb4d8c7ac668fc22be0ef37dc7ac55e82e9afe52bc7c0aa39f40fdbf30a1657d7426fce0418d0a26d22f1058c2647d1a67')
prepare() {
cd lua-$pkgver
patch -p1 -i ../cve-2014-5461.patch
patch -p1 -i ../lua-arch.patch
patch -p1 -i ../lua-5.1-cflags.diff
@ -40,7 +44,7 @@ package() {
make \
TO_BIN='lua5.1 luac5.1' \
TO_LIB="liblua5.1.a liblua5.1.so liblua5.1.so.5.1 liblua5.1.so.$pkgver" \
TO_LIB="liblua5.1.so liblua5.1.so.5.1 liblua5.1.so.$pkgver" \
INSTALL_DATA='cp -d' \
INSTALL_TOP="$pkgdir"/usr \
INSTALL_INC="$pkgdir"/usr/include/lua5.1 \

21
lua51/cve-2014-5461.patch Normal file
View File

@ -0,0 +1,21 @@
From: Enrico Tassi <gareuselesinge@debian.org>
Date: Tue, 26 Aug 2014 16:20:55 +0200
Subject: Fix stack overflow in vararg functions
---
src/ldo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ldo.c b/src/ldo.c
index d1bf786..30333bf 100644
--- a/src/ldo.c
+++ b/src/ldo.c
@@ -274,7 +274,7 @@ int luaD_precall (lua_State *L, StkId func, int nresults) {
CallInfo *ci;
StkId st, base;
Proto *p = cl->p;
- luaD_checkstack(L, p->maxstacksize);
+ luaD_checkstack(L, p->maxstacksize + p->numparams);
func = restorestack(L, funcr);
if (!p->is_vararg) { /* no varargs? */
base = func + 1;