Bash-5.2 patch 16: fix for a crash if one of the expressions in an arithmetic for command expands to NULL

This commit is contained in:
Chet Ramey
2023-11-09 16:39:38 -05:00
parent ec8113b986
commit 4214b0e12b
3 changed files with 5063 additions and 2 deletions
+1 -1
View File
@@ -3050,7 +3050,7 @@ eval_arith_for_expr (l, okp)
temp = expand_arith_string (expr, Q_DOUBLE_QUOTES|Q_ARITH);
if (l->next)
free (expr);
new = make_word_list (make_word (temp), (WORD_LIST *)NULL);
new = make_word_list (make_word (temp ? temp : ""), (WORD_LIST *)NULL);
free (temp);
if (new)
+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 15
#define PATCHLEVEL 16
#endif /* _PATCHLEVEL_H_ */
+5061
View File
File diff suppressed because it is too large Load Diff