diff options
author | eik <eik@FreeBSD.org> | 2004-08-19 09:15:47 +0000 |
---|---|---|
committer | eik <eik@FreeBSD.org> | 2004-08-19 09:15:47 +0000 |
commit | 5f4eaaf109510424286eebeaf816287e0aee124d (patch) | |
tree | 8fec41d0410d960b72bbfa2bd623efbae3e7378f /shells | |
parent | 27ef4a1d53f3c18ac1d117e5666fe8e783ea1a8b (diff) | |
download | FreeBSD-ports-5f4eaaf109510424286eebeaf816287e0aee124d.zip FreeBSD-ports-5f4eaaf109510424286eebeaf816287e0aee124d.tar.gz |
add three fixes from bug-bash@:
- pipefail option
- broken array expansion
- segmentation fault in unset typeset array variable
Diffstat (limited to 'shells')
-rw-r--r-- | shells/bash/Makefile | 2 | ||||
-rw-r--r-- | shells/bash/files/patch-jobs.c | 21 | ||||
-rw-r--r-- | shells/bash/files/patch-subst.c | 16 | ||||
-rw-r--r-- | shells/bash/files/patch-variables.c | 19 |
4 files changed, 57 insertions, 1 deletions
diff --git a/shells/bash/Makefile b/shells/bash/Makefile index 567a2d5..f3fe985 100644 --- a/shells/bash/Makefile +++ b/shells/bash/Makefile @@ -7,7 +7,7 @@ PORTNAME= bash PORTVERSION= 3.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= shells MASTER_SITES= ${MASTER_SITE_GNU} \ ftp://ftp.cwru.edu/pub/%SUBDIR%/ diff --git a/shells/bash/files/patch-jobs.c b/shells/bash/files/patch-jobs.c new file mode 100644 index 0000000..4e5db16 --- /dev/null +++ b/shells/bash/files/patch-jobs.c @@ -0,0 +1,21 @@ +# +# Fix pipefail option +# +# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00215.html +# +--- jobs.c.orig Fri Apr 23 21:28:25 2004 ++++ jobs.c Wed Aug 18 14:32:19 2004 +@@ -1778,8 +1778,11 @@ + if (pipefail_opt) + { + fail = 0; +- for (p = jobs[job]->pipe; p->next != jobs[job]->pipe; p = p->next) +- if (p->status != EXECUTION_SUCCESS) fail = p->status; ++ p = jobs[job]->pipe; ++ do { ++ if (p->status != EXECUTION_SUCCESS) fail = p->status; ++ p=p->next; ++ } while(p!=jobs[job]->pipe); + return fail; + } + diff --git a/shells/bash/files/patch-subst.c b/shells/bash/files/patch-subst.c new file mode 100644 index 0000000..d7687e2 --- /dev/null +++ b/shells/bash/files/patch-subst.c @@ -0,0 +1,16 @@ +# +# Fix broken array expansion +# +# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00192.html +# +--- subst.c.orig Sun Jul 4 13:56:13 2004 ++++ subst.c Thu Aug 12 13:36:17 2004 +@@ -4891,7 +4891,7 @@ + if (*e1p < 0) /* negative offsets count from end */ + *e1p += len; + +- if (*e1p >= len || *e1p < 0) ++ if (*e1p > len || *e1p < 0) + return (-1); + + #if defined (ARRAY_VARS) diff --git a/shells/bash/files/patch-variables.c b/shells/bash/files/patch-variables.c new file mode 100644 index 0000000..ac4bb07 --- /dev/null +++ b/shells/bash/files/patch-variables.c @@ -0,0 +1,19 @@ +# +# Fix segmentation fault in unset typeset array variable +# +# http://lists.gnu.org/archive/html/bug-bash/2004-08/msg00190.html +# +--- variables.c.orig Sun Jul 4 13:57:26 2004 ++++ variables.c Wed Aug 4 15:28:04 2004 +@@ -1599,7 +1599,10 @@ + /* local foo; local foo; is a no-op. */ + old_var = find_variable (name); + if (old_var && local_p (old_var) && old_var->context == variable_context) +- return (old_var); ++ { ++ VUNSETATTR (old_var, att_invisible); ++ return (old_var); ++ } + + was_tmpvar = old_var && tempvar_p (old_var); + if (was_tmpvar) |