Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/460d2e66c13c
branches:  netbsd-8
changeset: 852687:460d2e66c13c
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Dec 12 20:48:11 2019 +0000

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

        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 e2c05a001656 -r 460d2e66c13c external/mit/lua/dist/src/lapi.c
--- a/external/mit/lua/dist/src/lapi.c  Sun Dec 08 10:33:35 2019 +0000
+++ b/external/mit/lua/dist/src/lapi.c  Thu Dec 12 20:48:11 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lapi.c,v 1.9.2.1 2018/08/11 14:54:50 martin Exp $      */
+/*     $NetBSD: lapi.c,v 1.9.2.2 2019/12/12 20:48:11 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