aboutsummaryrefslogtreecommitdiff
path: root/shells/bash
diff options
context:
space:
mode:
Diffstat (limited to 'shells/bash')
-rw-r--r--shells/bash/Makefile1
-rw-r--r--shells/bash/files/patch-arrayfunc.c16
2 files changed, 17 insertions, 0 deletions
diff --git a/shells/bash/Makefile b/shells/bash/Makefile
index cf82560c341f..6934c16e2180 100644
--- a/shells/bash/Makefile
+++ b/shells/bash/Makefile
@@ -7,6 +7,7 @@
PORTNAME= bash
PORTVERSION= 3.0
+PORTREVISION= 1
CATEGORIES= shells
MASTER_SITES= ${MASTER_SITE_GNU} \
ftp://ftp.cwru.edu/pub/%SUBDIR%/
diff --git a/shells/bash/files/patch-arrayfunc.c b/shells/bash/files/patch-arrayfunc.c
new file mode 100644
index 000000000000..fbccb3cfc528
--- /dev/null
+++ b/shells/bash/files/patch-arrayfunc.c
@@ -0,0 +1,16 @@
+#
+# Fix segfault when accessing an unset array
+#
+# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00026.html
+#
+--- arrayfunc.c.orig Fri Dec 19 00:03:09 2003
++++ arrayfunc.c Sun Aug 1 20:43:00 2004
+@@ -611,7 +611,7 @@
+ var = find_variable (t);
+
+ free (t);
+- return var;
++ return (var == 0 || invisible_p (var)) ? (SHELL_VAR *)0 : var;
+ }
+
+ /* Return a string containing the elements in the array and subscript