gawk-diffs
[Top][All Lists]
Advanced

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

[SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4408-g3fb5ffc0


From: Arnold Robbins
Subject: [SCM] gawk branch, gawk-5.1-stable, updated. gawk-4.1.0-4408-g3fb5ffc0
Date: Wed, 15 Jun 2022 11:06:30 -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, gawk-5.1-stable has been updated
       via  3fb5ffc0dd119cc300b8bd4e1d368a9b39aba850 (commit)
      from  24595f4703988fa7b797438a97121b72d08f302a (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=3fb5ffc0dd119cc300b8bd4e1d368a9b39aba850

commit 3fb5ffc0dd119cc300b8bd4e1d368a9b39aba850
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Wed Jun 15 18:06:10 2022 +0300

    Bug fix for loading environment.

diff --git a/ChangeLog b/ChangeLog
index 5e462951..061e3539 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-06-15         Andrew J. Schorr      <aschorr@telemetry-investments.com>
+
+       * main.c (load_environ): Init ENVIRON_node before filling
+       it. Fixes a crash if something like "0=foo" is the first thing
+       in the environment. Thanks to David Arroyo <david@aqwari.net>
+       for the report.
+
 2022-05-24         Adam Van Scyoc        <avanscy@g.clemson.edu>
 
        * awkgram.y (make_assignable): Handle Op_field_assign.
diff --git a/main.c b/main.c
index 9e7762aa..9ac56a8b 100644
--- a/main.c
+++ b/main.c
@@ -916,6 +916,10 @@ load_environ()
        been_here = true;
 
        ENVIRON_node = install_symbol(estrdup("ENVIRON", 7), Node_var_array);
+
+       /* set up array functions */
+       init_env_array(ENVIRON_node);
+
        for (i = 0; environ[i] != NULL; i++) {
                static char nullstr[] = "";
 
@@ -946,9 +950,6 @@ load_environ()
        path_environ("AWKPATH", defpath);
        path_environ("AWKLIBPATH", deflibpath);
 
-       /* set up array functions */
-       init_env_array(ENVIRON_node);
-
        return ENVIRON_node;
 }
 

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

Summary of changes:
 ChangeLog | 7 +++++++
 main.c    | 7 ++++---
 2 files changed, 11 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

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