]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/bash/bash50-012
core157: Ship readline
[people/pmueller/ipfire-2.x.git] / src / patches / bash / bash50-012
CommitLineData
987826de
PM
1 BASH PATCH REPORT
2 =================
3
4Bash-Release: 5.0
5Patch-ID: bash50-012
6
7Bug-Reported-by: lessbug@qq.com
8Bug-Reference-ID: <tencent_6AA531D9A5CC4121D86BD5CDA2E0DA98C605@qq.com>
9Bug-Reference-URL:
10
11Bug-Description:
12
13When using previous-history to go back beyond the beginning of the history list,
14it's possible to move to an incorrect partial line.
15
16Patch (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_ */