gawk-diffs
[Top][All Lists]
Advanced

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

[SCM] gawk branch, master, updated. gawk-4.1.0-5405-gc89ccf6a


From: Arnold Robbins
Subject: [SCM] gawk branch, master, updated. gawk-4.1.0-5405-gc89ccf6a
Date: Tue, 24 Oct 2023 03:22:15 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, master has been updated
       via  c89ccf6a1384db4bee99ff0a9338016f5911fc56 (commit)
      from  30029046a2e096df4d9fcb7aedc01e393abce88d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=c89ccf6a1384db4bee99ff0a9338016f5911fc56

commit c89ccf6a1384db4bee99ff0a9338016f5911fc56
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Tue Oct 24 10:21:50 2023 +0300

    Fix a potential use-after-free error.

diff --git a/ChangeLog b/ChangeLog
index e00083e4..fda3411f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-10-24         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * builtin.c (setup_frame): Fix a potential use after free
+       error. Thanks to Michal Jaegermann for the report.
+
 2023-10-23         Arnold D. Robbins     <arnold@skeeve.com>
 
        * builtin.c (do_sub): Fix a use-after-free issue reported
diff --git a/eval.c b/eval.c
index b46e3aae..6bc39deb 100644
--- a/eval.c
+++ b/eval.c
@@ -1317,8 +1317,11 @@ setup_frame(INSTRUCTION *pc)
 
                /* $0 needs to be passed by value to a function */
                if (m == fields_arr[0]) {
+                       NODE *copy;
+
+                       copy = dupnode(m);      // will be real copy
                        DEREF(m);
-                       m = dupnode(m);
+                       m = copy;
                }
 
                switch (m->type) {

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog | 5 +++++
 eval.c    | 5 ++++-
 2 files changed, 9 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]