Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-9]: src/external/mit/lua/dist/src Pull up following revision(s) (...



details:   https://anonhg.NetBSD.org/src/rev/6ab261246b0a
branches:  netbsd-9
changeset: 843670:6ab261246b0a
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Dec 12 20:46:08 2019 +0000

description:
Pull up following revision(s) (requested by sevan in ticket #547):

        external/mit/lua/dist/src/lapi.c: revision 1.12

Apply a fix for the bug "Joining an upvalue with itself can cause a
use-after free", documented on http://www.lua.org/bugs.html

diffstat:

 external/mit/lua/dist/src/lapi.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (18 lines):

diff -r dc380ae29063 -r 6ab261246b0a external/mit/lua/dist/src/lapi.c
--- a/external/mit/lua/dist/src/lapi.c  Thu Dec 12 20:43:08 2019 +0000
+++ b/external/mit/lua/dist/src/lapi.c  Thu Dec 12 20:46:08 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lapi.c,v 1.11 2018/08/04 17:30:01 alnsn Exp $  */
+/*     $NetBSD: lapi.c,v 1.11.2.1 2019/12/12 20:46:08 martin Exp $     */
 
 /*
 ** Id: lapi.c,v 2.259.1.2 2017/12/06 18:35:12 roberto Exp 
@@ -1297,6 +1297,8 @@
   LClosure *f1;
   UpVal **up1 = getupvalref(L, fidx1, n1, &f1);
   UpVal **up2 = getupvalref(L, fidx2, n2, NULL);
+  if (*up1 == *up2)
+    return;
   luaC_upvdeccount(L, *up1);
   *up1 = *up2;
   (*up1)->refcount++;



Home | Main Index | Thread Index | Old Index