bash 4.3.11

This commit is contained in:
Jack Nagel 2014-04-13 14:59:08 -05:00
parent 8bffeb611f
commit b9dae75f39

View file

@ -4,17 +4,17 @@ class Bash < Formula
homepage 'http://www.gnu.org/software/bash/'
stable do
url "http://ftpmirror.gnu.org/bash/bash-4.2.tar.gz"
mirror "http://ftp.gnu.org/gnu/bash/bash-4.2.tar.gz"
sha256 "a27a1179ec9c0830c65c6aa5d7dab60f7ce1a2a608618570f96bfa72e95ab3d8"
version "4.2.45"
url "http://ftpmirror.gnu.org/bash/bash-4.3.tar.gz"
mirror "http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz"
sha256 "afc687a28e0e24dc21b988fa159ff9dbcf6b7caa92ade8645cc6d5605cd024d4"
version "4.3.11"
# Vendor the patches. The mirrors are unreliable for getting the patches,
# and the more patches there are, the more unreliable they get. Upstream
# patches can be found in: http://ftpmirror.gnu.org/bash/bash-4.2-patches
patch :p0 do
url "https://gist.github.com/jacknagel/4008180/raw/1509a257060aa94e5349250306cce9eb884c837d/bash-4.2-001-045.patch"
sha1 "f10d42cf4a7bc6d5599d705d270a602e02dfd517"
# patches can be found in: http://git.savannah.gnu.org/cgit/bash.git
patch do
url "https://gist.githubusercontent.com/jacknagel/10594061/raw/65a32e9329e0d1198b06e21542de6103bcc3549e/bash-4.3-001-011.patch"
sha1 "803fd4452aa071bc87b86a1d38d86acba4dc2a62"
end
end
@ -22,9 +22,6 @@ class Bash < Formula
depends_on 'readline'
# http://article.gmane.org/gmane.comp.shells.bash.bugs/20242
patch :DATA
def install
# When built with SSH_SOURCE_BASHRC, bash will source ~/.bashrc when
# it's non-interactively from sshd. This allows the user to set
@ -50,27 +47,3 @@ class Bash < Formula
assert_equal 0, $?.exitstatus
end
end
__END__
diff --git a/parse.y b/parse.y
index b5c94e7..085e5e4 100644
--- a/parse.y
+++ b/parse.y
@@ -5260,9 +5260,16 @@ decode_prompt_string (string)
#undef ROOT_PATH
#undef DOUBLE_SLASH_ROOT
else
+ {
/* polite_directory_format is guaranteed to return a string
no longer than PATH_MAX - 1 characters. */
- strcpy (t_string, polite_directory_format (t_string));
+ /* polite_directory_format might simply return the pointer to t_string
+ strcpy(3) tells dst and src may not overlap, OS X 10.9 asserts this and
+ triggers an abort trap if that's the case */
+ temp = polite_directory_format (t_string);
+ if (temp != t_string)
+ strcpy (t_string, temp);
+ }
temp = trim_pathname (t_string, PATH_MAX - 1);
/* If we're going to be expanding the prompt string later,