Bash-5.2 patch 1: fix crash with unset arrays in arithmetic contexts

This commit is contained in:
Chet Ramey
2022-10-05 10:36:55 -04:00
parent 74091dd4e8
commit a1e58b8c06
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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_ */
+1 -1
View File
@@ -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);