summaryrefslogtreecommitdiff
path: root/source/a/bash/bash-4.4-patches/bash44-022
blob: f692a2c46f1432e9c29fd4801340d3bfe49f2a98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
			     BASH PATCH REPORT
			     =================

Bash-Release:	4.4
Patch-ID:	bash44-022

Bug-Reported-by:	Nuzhna Pomoshch <nuzhna_pomoshch@yahoo.com>
Bug-Reference-ID:	<1317167476.1492079.1495999776464@mail.yahoo.com>
Bug-Reference-URL:	https://lists.gnu.org/archive/html/bug-readline/2017-05/msg00005.html

Bug-Description:

There are cases where a failing readline command (e.g., delete-char at the end
of a line) can cause a multi-character key sequence to `back up' and attempt
to re-read some of the characters in the sequence.

Patch (apply with `patch -p0'):

*** ../bash-4.4-patched/lib/readline/readline.c	2016-04-20 15:53:52.000000000 -0400
--- lib/readline/readline.c	2018-05-26 17:19:00.000000000 -0400
***************
*** 1058,1062 ****
  	r = _rl_dispatch (ANYOTHERKEY, m);
      }
!   else if (r && map[ANYOTHERKEY].function)
      {
        /* We didn't match (r is probably -1), so return something to
--- 1056,1060 ----
  	r = _rl_dispatch (ANYOTHERKEY, m);
      }
!   else if (r < 0 && map[ANYOTHERKEY].function)
      {
        /* We didn't match (r is probably -1), so return something to
***************
*** 1070,1074 ****
        return -2;
      }
!   else if (r && got_subseq)
      {
        /* OK, back up the chain. */
--- 1068,1072 ----
        return -2;
      }
!   else if (r < 0 && got_subseq)		/* XXX */
      {
        /* OK, back up the chain. */
*** ../bash-4.4/patchlevel.h	2016-06-22 14:51:03.000000000 -0400
--- patchlevel.h	2016-10-01 11:01:28.000000000 -0400
***************
*** 26,30 ****
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 21
  
  #endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
     looks for to find the patch level (for the sccs version string). */
  
! #define PATCHLEVEL 22
  
  #endif /* _PATCHLEVEL_H_ */