aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2019-11-25 00:40:52 +0100
committerVasyl Gello <vasek.gello@gmail.com>2019-11-26 20:24:31 +0000
commit9f90012712cc6554a8752e56e775c859cfd71e74 (patch)
tree9470a3da1081f9547ef2e6a3a4b250621efa693b
parent621fb366eddb890018e250f121b75246034defe6 (diff)
downloadandroid_external_bash-9f90012712cc6554a8752e56e775c859cfd71e74.tar.gz
android_external_bash-9f90012712cc6554a8752e56e775c859cfd71e74.tar.bz2
android_external_bash-9f90012712cc6554a8752e56e775c859cfd71e74.zip
Bash-4.3 patch 46
An incorrect conversion from an indexed to associative array can result in a core dump. Change-Id: I454b7e0249a8ef12468bc9dc5b01f617e4d864f8
-rw-r--r--patchlevel.h2
-rw-r--r--subst.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/patchlevel.h b/patchlevel.h
index beea688..22bb68c 100644
--- a/patchlevel.h
+++ b/patchlevel.h
@@ -25,6 +25,6 @@
regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
looks for to find the patch level (for the sccs version string). */
-#define PATCHLEVEL 45
+#define PATCHLEVEL 46
#endif /* _PATCHLEVEL_H_ */
diff --git a/subst.c b/subst.c
index 17653cc..4331f11 100644
--- a/subst.c
+++ b/subst.c
@@ -9561,7 +9561,14 @@ shell_expand_word_list (tlist, eflags)
opts[opti] = '\0';
if (opti > 0)
- make_internal_declare (tlist->word->word, opts);
+ {
+ t = make_internal_declare (tlist->word->word, opts);
+ if (t != EXECUTION_SUCCESS)
+ {
+ last_command_exit_value = t;
+ exp_jump_to_top_level (DISCARD);
+ }
+ }
t = do_word_assignment (tlist->word, 0);
if (t == 0)