diff options
author | Chet Ramey <chet.ramey@case.edu> | 2022-10-05 10:36:55 -0400 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2022-10-05 10:36:55 -0400 |
commit | a1e58b8c064cbf3cb0180b63e581770de7ccea5b (patch) | |
tree | f09da082026a67b9ee2005e1fbc42d88dd60544a | |
parent | 74091dd4e8086db518b30df7f222691524469998 (diff) | |
download | bash-a1e58b8c064cbf3cb0180b63e581770de7ccea5b.tar.gz |
Bash-5.2 patch 1: fix crash with unset arrays in arithmetic contexts
-rw-r--r-- | patchlevel.h | 2 | ||||
-rw-r--r-- | subst.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/patchlevel.h b/patchlevel.h index 165390c1..c0dbb500 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 0 +#define PATCHLEVEL 1 #endif /* _PATCHLEVEL_H_ */ @@ -10857,7 +10857,7 @@ expand_array_subscript (string, sindex, quoted, flags) exp = substring (string, si+1, ni); t = expand_subscript_string (exp, quoted & ~(Q_ARITH|Q_DOUBLE_QUOTES)); free (exp); - exp = sh_backslash_quote (t, abstab, 0); + exp = t ? sh_backslash_quote (t, abstab, 0) : savestring (""); free (t); slen = STRLEN (exp); |