aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-12-04 11:47:29 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2019-05-06 19:18:42 +0200
commit25cda9a81dc32280916a50e8f2e00120e189323f (patch)
tree9a29c8a5a1ad08ba22c7510320c8c789b0b255d8
parentfda894f6c300cc264f5ca3fb93f499fe51a15750 (diff)
downloadaports-25cda9a81dc32280916a50e8f2e00120e189323f.tar.gz
aports-25cda9a81dc32280916a50e8f2e00120e189323f.tar.bz2
aports-25cda9a81dc32280916a50e8f2e00120e189323f.tar.xz
main/lua5.3: fix linenoise patch
fixes #9644 (cherry picked from commit cde8024d0da937f5f7b0b9b329c1f27c14b00308)
-rw-r--r--main/lua5.3/APKBUILD4
-rw-r--r--main/lua5.3/linenoise.patch14
2 files changed, 9 insertions, 9 deletions
diff --git a/main/lua5.3/APKBUILD b/main/lua5.3/APKBUILD
index 614f27c8a3..6006f32f7c 100644
--- a/main/lua5.3/APKBUILD
+++ b/main/lua5.3/APKBUILD
@@ -3,7 +3,7 @@ pkgname=lua5.3
_pkgname=lua
pkgver=5.3.5
_luaver=${pkgname#lua}
-pkgrel=0
+pkgrel=2
pkgdesc="Powerful light-weight programming language"
url="https://www.lua.org/"
arch="all"
@@ -140,5 +140,5 @@ libs() {
sha512sums="4f9516acc4659dfd0a9e911bfa00c0788f0ad9348e5724fe8fb17aac59e9c0060a64378f82be86f8534e49c6c013e7488ad17321bafcc787831d3d67406bd0f4 lua-5.3.5.tar.gz
1bc6c623024c1738155b30ff9c0edcce0f336edc25aa20c3a1400c859421ea2015d75175cce8d515e055ac3e96028426b74812e04022af18a0ed4c4601556027 lua-5.3-make.patch
313ff823ed871f380a2cb0ba1f0afbba5cfa9b98da40e6e5e8f3c7a2e5993b13c2577efbe7147b79e3903ff27d5a814fa782c1c925092b08510cb4ce02abf464 lua-5.3-module_paths.patch
-49880d1131b7bd2a3169a26f401769a91d9a6a62cefe68aa5a89097139289588b7ef753535a2d0ba7f45c0369c760554940fd810716b7b1353deace32432fcfe linenoise.patch
+a2edcf5a41513492edff5fa6e97652e676ceb6c66bb2c6a7e6f345570248d7646167f0172ceb07a74fd9d4a43051ed8244fbd94706dd9f5593f174075592a527 linenoise.patch
fde7f5f5a184cd393665c7c8c7ba3c728e1413df5f63dbe60855af13ddd313d9300720298534f4312638ddf59fa678a38f708bce622dd7a2298b4ed87c068ae7 CVE-2019-6706-use-after-free-lua_upvaluejoin.patch"
diff --git a/main/lua5.3/linenoise.patch b/main/lua5.3/linenoise.patch
index fdca6205ae..ff9bb8672f 100644
--- a/main/lua5.3/linenoise.patch
+++ b/main/lua5.3/linenoise.patch
@@ -1,16 +1,16 @@
---- ./src/lua.c.orig
-+++ ./src/lua.c
-@@ -85,6 +85,15 @@
- add_history(lua_tostring(L, idx)); /* add it to history */
+diff --git a/src/lua.c b/src/lua.c
+index ca5b298..edfb479 100644
+--- a/src/lua.c
++++ b/src/lua.c
+@@ -85,6 +85,13 @@
+ #define lua_saveline(L,line) ((void)L, add_history(line))
#define lua_freeline(L,b) ((void)L, free(b))
+#elif defined(LUA_USE_LINENOISE)/* }{ */
+
+#include "linenoise.h"
+#define lua_readline(L,b,p) ((void)L, ((b)=linenoise(p)) != NULL)
-+#define lua_saveline(L,idx) \
-+ if (lua_rawlen(L,idx) > 0) /* non-empty line? */ \
-+ linenoiseHistoryAdd(lua_tostring(L, idx)); /* add it to history */
++#define lua_saveline(L,line) ((void)L, linenoiseHistoryAdd(line))
+#define lua_freeline(L,b) ((void)L, free(b))
+
#else /* }{ */