bash: update to 4.3.30

This commit is contained in:
Tom G. Christensen 2014-10-15 14:33:30 +02:00
parent 295ed7bdd3
commit 6a76fcb5e4
6 changed files with 4398 additions and 85 deletions

View File

@ -7,7 +7,7 @@
# Check the following 4 variables before running the script
topdir=bash
real_version=4.3
version=4.3.27
version=4.3.30
pkgver=1
source[0]=ftp://ftp.sunet.se/pub/gnu/bash/$topdir-$real_version.tar.gz
@ -44,7 +44,9 @@ patch[23]=bash43-024.edited
patch[24]=bash43-025.edited
patch[25]=bash43-026.edited
patch[26]=bash43-027.edited
patch[27]=bash-4.2-cve-2014-7169-2.patch
patch[27]=bash43-028.edited
patch[28]=bash43-029.edited
patch[29]=bash43-030.edited
# Global settings
export CPPFLAGS="-I$prefix/include"
@ -56,6 +58,8 @@ reg prep
prep()
{
generic_prep
setdir source
${__rm} -f y.tab.*
}
reg build
@ -81,6 +85,7 @@ install()
compat bash 4.2.45 1 1
compat bash 4.3.25 1 1
compat bash 4.3.26 1 1
compat bash 4.3.27 1 1
}
reg pack

View File

@ -1,5 +1,8 @@
CHANGELOG
---------
* Wed Oct 15 2014 Tom G. Christensen <swpkg@jupiterrise.com> - 4.3.30-1
- Update to 4.3.30
* Sun Sep 28 2014 Tom G. Christensen <swpkg@jupiterrise.com> - 4.3.27-1
- Update to 4.3.27 (replaces a RedHat patch with identical from upstream)

View File

@ -1,83 +0,0 @@
--- parse.y 2014-09-25 13:07:59.218209276 +0200
+++ parse.y 2014-09-25 15:26:52.813159810 +0200
@@ -264,9 +264,21 @@
/* Variables to manage the task of reading here documents, because we need to
defer the reading until after a complete command has been collected. */
-static REDIRECT *redir_stack[10];
+static REDIRECT **redir_stack;
int need_here_doc;
+/* Pushes REDIR onto redir_stack, resizing it as needed. */
+static void
+push_redir_stack (REDIRECT *redir)
+{
+ /* Guard against oveflow. */
+ if (need_here_doc + 1 > INT_MAX / sizeof (*redir_stack))
+ abort ();
+ redir_stack = xrealloc (redir_stack,
+ (need_here_doc + 1) * sizeof (*redir_stack));
+ redir_stack[need_here_doc++] = redir;
+}
+
/* Where shell input comes from. History expansion is performed on each
line when the shell is interactive. */
static char *shell_input_line = (char *)NULL;
@@ -519,42 +531,42 @@
source.dest = 0;
redir.filename = $2;
$$ = make_redirection (source, r_reading_until, redir, 0);
- redir_stack[need_here_doc++] = $$;
+ push_redir_stack ($$);
}
| NUMBER LESS_LESS WORD
{
source.dest = $1;
redir.filename = $3;
$$ = make_redirection (source, r_reading_until, redir, 0);
- redir_stack[need_here_doc++] = $$;
+ push_redir_stack ($$);
}
| REDIR_WORD LESS_LESS WORD
{
source.filename = $1;
redir.filename = $3;
$$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
- redir_stack[need_here_doc++] = $$;
+ push_redir_stack ($$);
}
| LESS_LESS_MINUS WORD
{
source.dest = 0;
redir.filename = $2;
$$ = make_redirection (source, r_deblank_reading_until, redir, 0);
- redir_stack[need_here_doc++] = $$;
+ push_redir_stack ($$);
}
| NUMBER LESS_LESS_MINUS WORD
{
source.dest = $1;
redir.filename = $3;
$$ = make_redirection (source, r_deblank_reading_until, redir, 0);
- redir_stack[need_here_doc++] = $$;
+ push_redir_stack ($$);
}
| REDIR_WORD LESS_LESS_MINUS WORD
{
source.filename = $1;
redir.filename = $3;
$$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
- redir_stack[need_here_doc++] = $$;
+ push_redir_stack ($$);
}
| LESS_LESS_LESS WORD
{
@@ -4757,7 +4769,7 @@
case CASE:
case SELECT:
case FOR:
- if (word_top < MAX_CASE_NEST)
+ if (word_top + 1 < MAX_CASE_NEST)
word_top++;
word_lineno[word_top] = line_number;
break;

2265
bash/src/bash43-028.edited Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,59 @@
BASH PATCH REPORT
=================
Bash-Release: 4.3
Patch-ID: bash43-029
Bug-Reported-by: Michal Zalewski <lcamtuf@coredump.cx>
Bug-Reference-ID:
Bug-Reference-URL:
Bug-Description:
When bash is parsing a function definition that contains a here-document
delimited by end-of-file (or end-of-string), it leaves the closing delimiter
uninitialized. This can result in an invalid memory access when the parsed
function is later copied.
Patch (apply with `patch -p0'):
*** ../bash-4.3.28/make_cmd.c 2011-12-16 08:08:01.000000000 -0500
--- make_cmd.c 2014-10-02 11:24:23.000000000 -0400
***************
*** 693,696 ****
--- 693,697 ----
temp->redirector = source;
temp->redirectee = dest_and_filename;
+ temp->here_doc_eof = 0;
temp->instruction = instruction;
temp->flags = 0;
*** ../bash-4.3.28/copy_cmd.c 2009-09-11 16:28:02.000000000 -0400
--- copy_cmd.c 2014-10-02 11:24:23.000000000 -0400
***************
*** 127,131 ****
case r_reading_until:
case r_deblank_reading_until:
! new_redirect->here_doc_eof = savestring (redirect->here_doc_eof);
/*FALLTHROUGH*/
case r_reading_string:
--- 127,131 ----
case r_reading_until:
case r_deblank_reading_until:
! new_redirect->here_doc_eof = redirect->here_doc_eof ? savestring (redirect->here_doc_eof) : 0;
/*FALLTHROUGH*/
case r_reading_string:
*** patchlevel.h 2012-12-29 10:47:57.000000000 -0500
--- patchlevel.h 2014-03-20 20:01:28.000000000 -0400
***************
*** 26,30 ****
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 28
#endif /* _PATCHLEVEL_H_ */
--- 26,30 ----
looks for to find the patch level (for the sccs version string). */
! #define PATCHLEVEL 29
#endif /* _PATCHLEVEL_H_ */

2064
bash/src/bash43-030.edited Normal file

File diff suppressed because it is too large Load Diff