From 9f90012712cc6554a8752e56e775c859cfd71e74 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Mon, 25 Nov 2019 00:40:52 +0100 Subject: Bash-4.3 patch 46 An incorrect conversion from an indexed to associative array can result in a core dump. Change-Id: I454b7e0249a8ef12468bc9dc5b01f617e4d864f8 --- patchlevel.h | 2 +- subst.c | 9 ++++++++- 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) -- cgit v1.2.3