From 9ce1ebb3c248c722692fe75f05640cd88bfeba65 Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Tue, 29 Dec 2020 23:24:20 +0100 Subject: [PATCH] lua5_3: 5.3.5 -> 5.3.6 We also remove the CVE-2019-6706 patch because it has been merged upstream. See: https://www.lua.org/work/diffs-lua-5.3.5-lua-5.3.6.html --- .../interpreters/lua-5/CVE-2019-6706.patch | 22 ------------------- .../interpreters/lua-5/default.nix | 10 ++++----- 2 files changed, 5 insertions(+), 27 deletions(-) delete mode 100644 pkgs/development/interpreters/lua-5/CVE-2019-6706.patch diff --git a/pkgs/development/interpreters/lua-5/CVE-2019-6706.patch b/pkgs/development/interpreters/lua-5/CVE-2019-6706.patch deleted file mode 100644 index 89e81b7eb68..00000000000 --- a/pkgs/development/interpreters/lua-5/CVE-2019-6706.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/src/lapi.c -+++ b/src/lapi.c -@@ -1285,14 +1285,14 @@ LUA_API void *lua_upvalueid (lua_State * - - LUA_API void lua_upvaluejoin (lua_State *L, int fidx1, int n1, - int fidx2, int n2) { -- LClosure *f1; -- UpVal **up1 = getupvalref(L, fidx1, n1, &f1); -+ UpVal **up1 = getupvalref(L, fidx1, n1, NULL); /* the last parameter not needed */ - UpVal **up2 = getupvalref(L, fidx2, n2, NULL); -+ if (*up1 == *up2) return; /* Already joined */ -+ (*up2)->refcount++; -+ if (upisopen(*up2)) (*up2)->u.open.touched = 1; -+ luaC_upvalbarrier(L, *up2); - luaC_upvdeccount(L, *up1); - *up1 = *up2; -- (*up1)->refcount++; -- if (upisopen(*up1)) (*up1)->u.open.touched = 1; -- luaC_upvalbarrier(L, *up1); - } - - diff --git a/pkgs/development/interpreters/lua-5/default.nix b/pkgs/development/interpreters/lua-5/default.nix index 5c094893982..d78d5ba0c2d 100644 --- a/pkgs/development/interpreters/lua-5/default.nix +++ b/pkgs/development/interpreters/lua-5/default.nix @@ -29,12 +29,12 @@ in rec { }); lua5_3 = callPackage ./interpreter.nix { - sourceVersion = { major = "5"; minor = "3"; patch = "5"; }; - hash = "0c2eed3f960446e1a3e4b9a1ca2f3ff893b6ce41942cf54d5dd59ab4b3b058ac"; + sourceVersion = { major = "5"; minor = "3"; patch = "6"; }; + hash = "0q3d8qhd7p0b7a4mh9g7fxqksqfs6mr1nav74vq26qvkp2dxcpzw"; + patches = - lib.optionals stdenv.isDarwin [ ./5.2.darwin.patch ] ++ [ - ./CVE-2019-6706.patch - ]; + lib.optionals stdenv.isDarwin [ ./5.2.darwin.patch ]; + postConfigure = lib.optionalString (!stdenv.isDarwin) '' cat ${./lua-5.3-dso.make} >> src/Makefile sed -e 's/ALL_T *= */& $(LUA_SO)/' -i src/Makefile