python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / bash / bash44-009.patch
blob3ba1b3fe0f35b99cc4a69af69562cfb4ea621a35
1 From https://ftp.gnu.org/gnu/bash/bash-4.4-patches/bash44-009
3 Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
5 BASH PATCH REPORT
6 =================
8 Bash-Release: 4.4
9 Patch-ID: bash44-009
11 Bug-Reported-by: Hong Cho <hong.cho@citrix.com>
12 Bug-Reference-ID: <c30b5fe62b2543af8297e47ca487c29c@SJCPEX02CL02.citrite.net>
13 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2016-12/msg00043.html
15 Bug-Description:
17 There is a race condition in add_history() that can be triggered by a fatal
18 signal arriving between the time the history length is updated and the time
19 the history list update is completed. A later attempt to reference an
20 invalid history entry can cause a crash.
22 Patch (apply with `patch -p0'):
24 *** bash-4.4-patched/lib/readline/history.c 2016-11-11 13:42:49.000000000 -0500
25 --- b/lib/readline/history.c 2016-12-05 10:37:51.000000000 -0500
26 ***************
27 *** 280,283 ****
28 --- b/280,284 ----
30 HIST_ENTRY *temp;
31 + int new_length;
33 if (history_stifled && (history_length == history_max_entries))
34 ***************
35 *** 296,306 ****
36 /* Copy the rest of the entries, moving down one slot. Copy includes
37 trailing NULL. */
38 - #if 0
39 - for (i = 0; i < history_length; i++)
40 - the_history[i] = the_history[i + 1];
41 - #else
42 memmove (the_history, the_history + 1, history_length * sizeof (HIST_ENTRY *));
43 - #endif
45 history_base++;
47 --- b/297,303 ----
48 /* Copy the rest of the entries, moving down one slot. Copy includes
49 trailing NULL. */
50 memmove (the_history, the_history + 1, history_length * sizeof (HIST_ENTRY *));
52 + new_length = history_length;
53 history_base++;
55 ***************
56 *** 316,320 ****
57 history_size = DEFAULT_HISTORY_INITIAL_SIZE;
58 the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
59 ! history_length = 1;
61 else
62 --- b/313,317 ----
63 history_size = DEFAULT_HISTORY_INITIAL_SIZE;
64 the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
65 ! new_length = 1;
67 else
68 ***************
69 *** 326,330 ****
70 xrealloc (the_history, history_size * sizeof (HIST_ENTRY *));
72 ! history_length++;
75 --- b/323,327 ----
76 xrealloc (the_history, history_size * sizeof (HIST_ENTRY *));
78 ! new_length = history_length + 1;
81 ***************
82 *** 332,337 ****
83 temp = alloc_history_entry ((char *)string, hist_inittime ());
85 ! the_history[history_length] = (HIST_ENTRY *)NULL;
86 ! the_history[history_length - 1] = temp;
89 --- b/329,335 ----
90 temp = alloc_history_entry ((char *)string, hist_inittime ());
92 ! the_history[new_length] = (HIST_ENTRY *)NULL;
93 ! the_history[new_length - 1] = temp;
94 ! history_length = new_length;
97 *** bash-4.4/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
98 --- b/patchlevel.h 2016-10-01 11:01:28.000000000 -0400
99 ***************
100 *** 26,30 ****
101 looks for to find the patch level (for the sccs version string). */
103 ! #define PATCHLEVEL 8
105 #endif /* _PATCHLEVEL_H_ */
106 --- b/26,30 ----
107 looks for to find the patch level (for the sccs version string). */
109 ! #define PATCHLEVEL 9
111 #endif /* _PATCHLEVEL_H_ */