]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/bash/bash50-012
7470e766550fc911c0d6be0ff5f14b4871fe9ff1
[ipfire-2.x.git] / src / patches / bash / bash50-012
1 BASH PATCH REPORT
2 =================
3
4 Bash-Release: 5.0
5 Patch-ID: bash50-012
6
7 Bug-Reported-by: lessbug@qq.com
8 Bug-Reference-ID: <tencent_6AA531D9A5CC4121D86BD5CDA2E0DA98C605@qq.com>
9 Bug-Reference-URL:
10
11 Bug-Description:
12
13 When using previous-history to go back beyond the beginning of the history list,
14 it's possible to move to an incorrect partial line.
15
16 Patch (apply with `patch -p0'):
17
18 *** ../bash-5.0-patched/lib/readline/misc.c 2017-07-07 17:30:12.000000000 -0400
19 --- lib/readline/misc.c 2019-05-16 11:43:46.000000000 -0400
20 ***************
21 *** 577,580 ****
22 --- 590,594 ----
23 {
24 HIST_ENTRY *old_temp, *temp;
25 + int had_saved_line;
26
27 if (count < 0)
28 ***************
29 *** 589,592 ****
30 --- 603,607 ----
31
32 /* If we don't have a line saved, then save this one. */
33 + had_saved_line = _rl_saved_line_for_history != 0;
34 rl_maybe_save_line ();
35
36 ***************
37 *** 612,616 ****
38 if (temp == 0)
39 {
40 ! rl_maybe_unsave_line ();
41 rl_ding ();
42 }
43 --- 627,632 ----
44 if (temp == 0)
45 {
46 ! if (had_saved_line == 0)
47 ! _rl_free_saved_history_line ();
48 rl_ding ();
49 }
50 *** ../bash-5.0/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
51 --- patchlevel.h 2016-10-01 11:01:28.000000000 -0400
52 ***************
53 *** 26,30 ****
54 looks for to find the patch level (for the sccs version string). */
55
56 ! #define PATCHLEVEL 11
57
58 #endif /* _PATCHLEVEL_H_ */
59 --- 26,30 ----
60 looks for to find the patch level (for the sccs version string). */
61
62 ! #define PATCHLEVEL 12
63
64 #endif /* _PATCHLEVEL_H_ */