diff -urN orig-bash-3.0/bash30-001 bash-3.0/bash30-001
--- orig-bash-3.0/bash30-001 1970-01-01 02:00:00.000000000 +0200
+++ bash-3.0/bash30-001 2005-02-14 22:33:55.000000000 +0200
@@ -0,0 +1,164 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 3.0
+Patch-ID: bash30-001
+
+Bug-Reported-by: Karlheinz Nolte <kn@k-nolte.de>
+Bug-Reference-ID: <20040801200058.GA3311@mars.home.k-nolte.de>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00009.html
+
+Bug-Description:
+
+ The following script triggers the segfault.
+ This was found by Costa Tsaousis the author of FireHOL.
+ He wrotes:
+
+ "I think I have found the bug. The script bellow crashes at the
+ third echo (UNSET). It seems to be a problem of the "unset" BASH
+ function when erasing arrays. It leaves something behind so that if
+ the array just unset is referenced, it produces a segmentation fault.
+ According to the documentation the first and the third expansions
+ should be exactly the same."
+
+Patch:
+
+*** ../bash-3.0/arrayfunc.c Fri Dec 19 00:03:09 2003
+--- arrayfunc.c Sun Aug 1 20:43:00 2004
+***************
+*** 612,616 ****
+
+ free (t);
+! return var;
+ }
+
+--- 612,616 ----
+
+ free (t);
+! return (var == 0 || invisible_p (var)) ? (SHELL_VAR *)0 : var;
+ }
+
+
+*** ../bash-3.0/subst.c Sun Jul 4 13:56:13 2004
+--- subst.c Thu Aug 12 13:36:17 2004
+***************
+*** 4983,4987 ****
+ return -1;
+ }
+! else if ((v = find_variable (varname)) && array_p (v))
+ {
+ vtype = VT_ARRAYMEMBER;
+--- 5003,5007 ----
+ return -1;
+ }
+! else if ((v = find_variable (varname)) && (invisible_p (v) == 0) && array_p (v))
+ {
+ vtype = VT_ARRAYMEMBER;
+
+*** ../bash-3.0/variables.c Sun Jul 4 13:57:26 2004
+--- variables.c Wed Aug 4 15:28:04 2004
+***************
+*** 1420,1428 ****
+
+ # if defined (DEBUGGER)
+! v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, (att_invisible|att_noassign));
+! v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, (att_invisible|att_noassign));
+ # endif /* DEBUGGER */
+! v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, (att_invisible|att_noassign));
+! v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, (att_invisible|att_noassign));
+ #endif
+
+--- 1420,1428 ----
+
+ # if defined (DEBUGGER)
+! v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, att_noassign);
+! v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, att_noassign);
+ # endif /* DEBUGGER */
+! v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, att_noassign);
+! v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, att_noassign);
+ #endif
+
+***************
+*** 1600,1604 ****
+ old_var = find_variable (name);
|