summaryrefslogtreecommitdiffstats
path: root/patches/source/bash/bash-4.2-patches/bash42-047
diff options
context:
space:
mode:
Diffstat (limited to 'patches/source/bash/bash-4.2-patches/bash42-047')
-rw-r--r--patches/source/bash/bash-4.2-patches/bash42-04749
1 files changed, 49 insertions, 0 deletions
diff --git a/patches/source/bash/bash-4.2-patches/bash42-047 b/patches/source/bash/bash-4.2-patches/bash42-047
new file mode 100644
index 000000000..65aff1c1b
--- /dev/null
+++ b/patches/source/bash/bash-4.2-patches/bash42-047
@@ -0,0 +1,49 @@
+ BASH PATCH REPORT
+ =================
+
+Bash-Release: 4.2
+Patch-ID: bash42-047
+
+Bug-Reported-by: Matthew Riley <mattdr@google.com>
+Bug-Reference-ID: <CA+NEdkwP3gw+gbcF5+xnR1pvcuzb1mDVzvmuJOpHRGHA9T7VFg@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2013-03/msg00047.html
+
+Bug-Description:
+
+The function that shortens pathnames for $PS1 according to the value of
+$PROMPT_DIRTRIM uses memcpy on potentially-overlapping regions of memory,
+when it should use memmove. The result is garbled pathnames in prompt
+strings.
+
+Patch (apply with `patch -p0'):
+
+*** ../bash-4.2-patched/general.c 2010-12-12 15:06:27.000000000 -0500
+--- general.c 2014-01-30 16:46:15.000000000 -0500
+***************
+*** 767,771 ****
+
+ nlen = nend - ntail;
+! memcpy (nbeg, ntail, nlen);
+ nbeg[nlen] = '\0';
+
+--- 767,771 ----
+
+ nlen = nend - ntail;
+! memmove (nbeg, ntail, nlen);
+ nbeg[nlen] = '\0';
+
+*** ../bash-4.2-patched/patchlevel.h Sat Jun 12 20:14:48 2010
+--- patchlevel.h Thu Feb 24 21:41:34 2011
+***************
+*** 26,30 ****
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 46
+
+ #endif /* _PATCHLEVEL_H_ */
+--- 26,30 ----
+ looks for to find the patch level (for the sccs version string). */
+
+! #define PATCHLEVEL 47
+
+ #endif /* _PATCHLEVEL_H_ */