bash/bash-5.2-patch-5.patch
Siteshwar Vashisht c58d3fff91 Update to bash-5.2 patchlevel 9
Resolves: #2140722
2022-11-18 12:33:23 +01:00

25 lines
819 B
Diff

diff --git a/patchlevel.h b/patchlevel.h
--- 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 4
+#define PATCHLEVEL 5
#endif /* _PATCHLEVEL_H_ */
diff --git a/subst.c b/subst.c
--- a/subst.c
+++ b/subst.c
@@ -8965,7 +8965,8 @@ pat_subst (string, pat, rep, mflags)
return (ret);
}
else if (*string == 0 && (match_pattern (string, pat, mtype, &s, &e) != 0))
- return ((mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2) : savestring (rep));
+ return (mflags & MATCH_EXPREP) ? strcreplace (rep, '&', "", 2)
+ : (rep ? savestring (rep) : savestring (""));
ret = (char *)xmalloc (rsize = 64);
ret[0] = '\0';