]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/bash/bash43-009
Revert "bash/readline: drop orphaned patches"
[ipfire-2.x.git] / src / patches / bash / bash43-009
CommitLineData
d19c8267
AF
1 BASH PATCH REPORT
2 =================
3
4Bash-Release: 4.3
5Patch-ID: bash43-009
6
7Bug-Reported-by: Matthias Klose <doko@debian.org>
8Bug-Reference-ID: <53346FC8.6090005@debian.org>
9Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00171.html
10
11Bug-Description:
12
13There is a problem with unsigned sign extension when attempting to reallocate
14the input line when it is fewer than 3 characters long and there has been a
15history expansion. The sign extension causes the shell to not reallocate the
16line, which results in a segmentation fault when it writes past the end.
17
18Patch (apply with `patch -p0'):
19
20*** ../bash-4.3-patched/parse.y 2014-02-11 09:42:10.000000000 -0500
21--- parse.y 2014-03-27 16:33:29.000000000 -0400
22***************
23*** 2425,2429 ****
24 if (shell_input_line_terminator != EOF)
25 {
26! if (shell_input_line_size < SIZE_MAX && shell_input_line_len > shell_input_line_size - 3)
27 shell_input_line = (char *)xrealloc (shell_input_line,
28 1 + (shell_input_line_size += 2));
29--- 2425,2429 ----
30 if (shell_input_line_terminator != EOF)
31 {
32! if (shell_input_line_size < SIZE_MAX-3 && (shell_input_line_len+3 > shell_input_line_size))
33 shell_input_line = (char *)xrealloc (shell_input_line,
34 1 + (shell_input_line_size += 2));
35*** ../bash-4.3-patched/y.tab.c 2014-03-28 11:17:06.000000000 -0400
36--- y.tab.c 2014-04-07 11:48:31.000000000 -0400
37***************
38*** 4737,4741 ****
39 if (shell_input_line_terminator != EOF)
40 {
41! if (shell_input_line_size < SIZE_MAX && shell_input_line_len > shell_input_line_size - 3)
42 shell_input_line = (char *)xrealloc (shell_input_line,
43 1 + (shell_input_line_size += 2));
44--- 4737,4741 ----
45 if (shell_input_line_terminator != EOF)
46 {
47! if (shell_input_line_size < SIZE_MAX-3 && (shell_input_line_len+3 > shell_input_line_size))
48 shell_input_line = (char *)xrealloc (shell_input_line,
49 1 + (shell_input_line_size += 2));
50*** ../bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500
51--- patchlevel.h 2014-03-20 20: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 8
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 9
63
64 #endif /* _PATCHLEVEL_H_ */