summaryrefslogtreecommitdiff
path: root/debian/patches/bash43-003.diff
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/bash43-003.diff')
-rw-r--r--debian/patches/bash43-003.diff42
1 files changed, 42 insertions, 0 deletions
diff --git a/debian/patches/bash43-003.diff b/debian/patches/bash43-003.diff
new file mode 100644
index 0000000..8b9de8d
--- /dev/null
+++ b/debian/patches/bash43-003.diff
@@ -0,0 +1,42 @@
+# DP: bash43-003 upstream patch
+
+Bash-Release: 4.3
+Patch-ID: bash43-003
+
+Bug-Reported-by: Anatol Pomozov <anatol.pomozov@gmail.com>
+Bug-Reference-ID: <CAOMFOmXy3mT2So5GQ5F-smCVArQuAeBwZ2QKzgCtMeXJoDeYOQ@mail.gmail.com>
+Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00010.html
+
+Bug-Description:
+
+When in callback mode, some readline commands can cause readline to seg
+fault by passing invalid contexts to callback functions.
+
+Patch (apply with `patch -p0'):
+
+Index: b/patchlevel.h
+===================================================================
+--- a/patchlevel.h
++++ b/patchlevel.h
+@@ -25,6 +25,6 @@
+ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
+ looks for to find the patch level (for the sccs version string). */
+
+-#define PATCHLEVEL 2
++#define PATCHLEVEL 3
+
+ #endif /* _PATCHLEVEL_H_ */
+Index: b/lib/readline/readline.c
+===================================================================
+--- a/lib/readline/readline.c
++++ b/lib/readline/readline.c
+@@ -744,7 +744,8 @@
+ r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
+
+ RL_CHECK_SIGNALS ();
+- if (r == 0) /* success! */
++ /* We only treat values < 0 specially to simulate recursion. */
++ if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or failure! */
+ {
+ _rl_keyseq_chain_dispose ();
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);